xxxxxxxxxx
if(typeof propertyValue!='undefined' && propertyValue){
//execute code here
}
xxxxxxxxxx
const str: string = ""; // the string to check
if (str.length === 0) {
console.log("String is empty");
} else {
console.log("String is not empty");
}
xxxxxxxxxx
if(typeof namedProperty!='undefined' && namedProperty){
return this.namedProperty;
}