check if a value is not null js code example Example: javascript is not null if(data !== null && data !== '') { // do something }