Use Object.prototype.isPrototypeOf(obj) in isPlainObject. resolved #654