function isDefined(m) { return typeof m != 'undefined'; } function isFunction(m) { return typeof m == 'function'; } function isObject(m) { return m && typeof m == 'object'; } function isString(m) { return typeof m == 'string'; } function isBoolean(m) { return typeof m == 'boolean'; } function isNumber(m) { return typeof m == 'number'; } function isArray(m) { return isObject(m) && Object.getPrototypeOf(m) == Array.prototype } // For nodejs use this: function isArray(m) { return isObject(m) && m instanceof Array }