Match the spec properly

Fixes #1 and #2.
Did you see the commit message of the commit that introduced this change?

> Speed up the “is object” check in case of `null` or `undefined`