simplify null guard

We could use `!== null` here instead, since `typeof undefined` is not `'object'`, but as a general rule I avoid differentiating between null and undefined.

Ah, nice! Updated to use a one-liner. :)