Backport of r51379 from trunk:

Add asserts to check for 'impossible' NULL values, with comments.
In one place where I'm not 1000% sure about the non-NULL, raise
a RuntimeError for safety.

This should fix the klocwork issues that Neal sent me.  If so,
it should be applied to the release25-maint branch also.
1 file changed