[TIMOB-17713] (3.4.x) Check if sourceApplication is null

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