Speed up the “is object” check in case of `null` or `undefined`