def ensure_valid_default_value(value)
      if !value.nil? && types && types.none? { |type| type === value }
        raise TypeError, I18n.t("lita.config.type_error", attribute: name, types: types.join(", "))
      end
    end
def ensure_valid_default_value(value)
      if !value.nil? && types && types.none? { |type| type === value }
        raise TypeError, I18n.t("lita.config.type_error", attribute: name, types: types.join(", "))
      end
    end
Raise if value is non-nil and isn't one of the specified types.