TIMOB-14566 add null value checking

checked null value
https://jira.appcelerator.org/browse/TIMOB-14566