JavaScript Compruebe si el objeto es nulo o vacío
if (typeof value !== 'undefined' && value) {
//deal with value'
};
Sonic
if (typeof value !== 'undefined' && value) {
//deal with value'
};
function isRealValue(obj)
{
return obj && obj !== 'null' && obj !== 'undefined';
}
//Use isRealValue(obj) to check further, will always return truthy object.