check null and blank in js code example
Example 1: javascript is not null
if(data !== null && data !== '') {
// do something
}
Example 2: javascript check if object is null or empty
if (typeof value !== 'undefined' && value) {
//deal with value'
};