Hide text if its dataset content is empty

But how I could know if the text box is empty??
Like:

let text199 = $w(’ #text199 ');

if(text199.value === ’ ‘){
$w(’ #text199 ‘).hide();
$w(’ #box1 ').hide();
}

→ In the #text199 field I have asigned a cell of the database, and in some cases this cell doesn’t contain information, so I want to hide/collapse this text field. The same happends with other text fields so I would
want to know individually wich ones are empty and wich ones no.

Could you help me?

Thanks for the replay.