if (myString == null || myString.equals(""))
throw new IllegalArgumentException("empty string");
let str1 = "Hello world!";
let str2 = "";
let str3 = 4;
console.log(str1.length === 0)
console.log(str2.length === 0)
console.log(str3.length === 0)
false
true
false