Timob 17016 new

https://jira.appcelerator.org/browse/TIMOB-17016
Null check added to prevent crash.
Based on 3_4_X.
This is already merged in master and in 3_4_X by https://github.com/appcelerator/titanium_mobile/pull/5651.
@hieupham007 - it is null for the zombie fragments that are retained in the fragment manager (and NPE happens without the test), and are recreated (and onCreateView is called) if the activity was destroyed and then recreated. This is fixed in my latest PR which ensures that fragments are reused: https://github.com/appcelerator/titanium_mobile/pull/6008