r4357: Return a more sensible error code if a NULL (as opposed to the valid