A better typeOf method for JavaScript, where null !== "object"