typeof <variable name> shows its type in string in JavaScript
function isObject(val) { return (typeof val === "object"); }