Here you can find the source of isNullOrEmpty()
String.prototype.isNullOrEmpty = function() { return (!this || 0 === this.length || /^\s*$/.test(this)); };
String.prototype.isNullOrEmpty = function(){ return !(this && this.length > 0); };
String.prototype.isNullOrEmpty = function () { return this === null || this.length === 0; };
function isNullOrEmptyString(obj) { if (isNullOrUnderdefined(obj)) return false; if (isStringType(obj)) { return obj.length == 0; return false;
String.prototype.isNullOrWhitespace = function () { return this === null || this.replace(/\s/g, '').length === 0; };