              self.default_empty_html = None
              self.initial = None
          super().__init__(**kwargs)
  
      def to_internal_value(self, data):
          with contextlib.suppress(TypeError):
              if self._lower_if_str(data) in self.TRUE_VALUES:
                  return True
 
</s> remove             if data in self.TRUE_VALUES:
 </s> add             if self._lower_if_str(data) in self.TRUE_VALUES: </s> remove             elif data in self.FALSE_VALUES:
 </s> add             elif self._lower_if_str(data) in self.FALSE_VALUES: </s> remove     NULL_VALUES = {'null', 'Null', 'NULL', '', None}
 </s> add     NULL_VALUES = {'null', '', None} </s> remove             elif data in self.NULL_VALUES and self.allow_null:
 </s> add             elif self._lower_if_str(data) in self.NULL_VALUES and self.allow_null: </s> remove         if value in self.TRUE_VALUES:
 </s> add         if self._lower_if_str(value) in self.TRUE_VALUES:
    @staticmethod
    def _lower_if_str(value):
        if isinstance(value, str):
            return value.lower()
        return value

              self.default_empty_html = None
              self.initial = None
          super().__init__(**kwargs)
  
    @staticmethod
    def _lower_if_str(value):
        if isinstance(value, str):
            return value.lower()
        return value

      def to_internal_value(self, data):
          with contextlib.suppress(TypeError):
              if self._lower_if_str(data) in self.TRUE_VALUES:
                  return True
keep keep keep add keep keep keep keep
 Permit mixed casing of string values for BooleanField validation (#8970)

* be more permissive of mixed casing in validating strings for BooleanField values

* undo unnecessary change

* lint 
rest_framework/fields.py