typeof(obj) returns a String that describes the type of obj.
typeof does not throw an error if obj does not exist at all, it just returns the string "undefined".
The possible returned values are:
undefined
object
boolean
number
string
function
symbol (new with ECMAScript 2015)
Since the set of return values is rather small, a better way to find out with what object someone is dealing, obj.constructor.name might be more constructive.