diff --git a/index.js b/index.js index aa2bb39..bdcfdc8 100644 --- a/index.js +++ b/index.js @@ -66,7 +66,7 @@ module.exports = function kindOf(val) { }; function ctorName(val) { - return val.constructor ? val.constructor.name : null; + return val.constructor && typeof val.constructor === 'function' ? val.constructor.name : null; } function isArray(val) {