function isObject(val) { if (val === null) { return false;} return ( (typeof val === 'function') || (typeof val === 'object') ); }