I think this would work. Function that returns true or false, possibly null.
const isObject = obj => obj && obj.constructor && obj.constructor === Object;
isObject({}) // true
isObject([]) // false
isObject(new Number(123)) // false
isObject(null) // false