syamantics.com | JS FAQ : Checking undefined, isset and empty in Javascript
http://www.syamantics.com/js-faq-checking-undefined-isset-and-empty-in-javascript#
if(typeof myVar !== ‘undefined’ || myVar) { // myVar is defined and not empty }
if(typeof myVar !== ‘undefined’ || myVar) { // myVar is defined and not empty }