Check out example codes for "how to check is null or empty in typescript". It will help you in understanding the concepts better.

Code Example 1

if(typeof propertyValue!='undefined' && propertyValue){
	//execute code here
}

Learn ReactJs, React Native from akashmittal.com