3.0 fix notnull

Fixes #3836
I don't think so. Apigen uses them.