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