Revert "Optimized null checks"

This reverts commit f54db4120f4d72ab1798e0a19f6657105d921c8e.