`upgrade_settings.nil?` is not needed as `nil.kind_of?(Hash) => false`