js check if object has null code example
Example: javascript check if object is null or empty
if (typeof value !== 'undefined' && value) {
//deal with value'
};
if (typeof value !== 'undefined' && value) {
//deal with value'
};