function isObj(value) {
    var type = typeof value;
    return value !== null && (type === 'object' || type === 'function');
}
Check if a value is an object or a function. Keep in mind that array, function, regexp, etc, are objects in JavaScript.

@param value the value to check
@return true if the value is an object or a function