a sintaxe de javascript para verificar nulo ou vazio ou indefinido
if (typeof value !== 'undefined' && value) {
//deal with value'
};
javascript verificar se a string está vazia
var string = "not empty";
if(string == ""){
console.log("Please Add");
}
else{
console.log("You can pass"); // console will log this msg because our string is not empty
}