diff --git a/src/type-of.js b/src/type-of.js index 7b64c17..69cba74 100644 --- a/src/type-of.js +++ b/src/type-of.js @@ -2,7 +2,9 @@ module.exports = function typeOf(value) { // FIXME: Better check - if (typeof value === "object") { + if (value == null) { + return null; + } else if (typeof value === "object") { return value.type; } else { return null;