Added null checks in onCreate of SettingsFragment