[TIMOB-17713] Check if sourceApplication is null

Details in [Jira ticket](https://jira.appcelerator.org/browse/TIMOB-17713)