added null checking to readSettingsFromModel method