[TIMOB-17713] Check if sourceApplication is null

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