Comparing `null` with `==` in JavaScript is the only place where `null` is actually useful &mdash; it catches  both `null` and `undefined`.

Another minor style nit &mdash; please try to keep a space before the `if` bracket.