Javascript String isBlank()
isBlank()
String.prototype.isBlank = function() { return (this.trim() == ""); }
String.prototype.isBlank = function() { return (!this || /^\s*$/.test(this)); };