nodejs string empty or null code example Example: is var is not blank then display value in javascript if(data !== null && data !== '') { // do something }