Timob 17016 new

https://jira.appcelerator.org/browse/TIMOB-17016
Null check added to prevent crash.
Based on 3_4_X.