Get rid of the checkNonNull helper, replace it by codegen.

There was only one place in the compiler where this helper was
used, and it's a rare case. So I simply replaced it by codegen
that does the same thing.