Here you can find the source of isNullOrWhitespace()
String.prototype.isNullOrWhitespace = function () { return this === null || this.replace(/\s/g, '').length === 0; };
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.isNullOrWhitespace = function( input ) { return !input || !input.trim(); };
String.prototype.isEmpty = function() { return this == ''; };
String.prototype.isEmpty = function() { return (this.length === 0 || !this.trim()); };
"use strict"; String.prototype.isEmpty = function() { return (this.length === 0 || !this.trim()); };