Узел пустой строка

if (!a.trim()) {
    // is empty or whitespace
}
Amused Ape