Check out example codes for "isnull or empty typescript". It will help you in understanding the concepts better.

Code Example 1

if(typeof namedProperty!='undefined' && namedProperty){
   return this.namedProperty;
}

Learn ReactJs, React Native from akashmittal.com