timob-14324: fix preferences crashes on first launch

test case in: https://jira.appcelerator.org/browse/TIMOB-14179
this would fix https://jira.appcelerator.org/browse/TIMOB-14324 as well