if(typeof myVar !== ‘undefined’ || myVar) {
// myVar is defined and not empty
}