1//checks if is object, null val returns false
2function isObject(val) {
3 if (val === null) { return false;}
4 return ( (typeof val === 'function') || (typeof val === 'object') );
5}
6var person = {"name":"Boby Snark"};
7isObject(person);//true