[TIMOB-14510] Avoid crash

Test is in [JIRA](https://jira.appcelerator.org/browse/TIMOB-14510)