Avoid NPE.

I've had this sitting around for a while because it seems to fix things.
However, I hate just adding a null check to avoid an NPE, and didn't want
to check it in until I knew why it never had this problem before...

But now we're running into a validation error that this same piece of code
fixes, so here we go.
Added a note.

I will return for cleanup.