TIMOB-17016-Null check to avoid crash

Added null check to avoid the crash

https://jira.appcelerator.org/browse/TIMOB-17016