hardened null check