Cleans and returns the given value, or raises a ParameterNotValidError exception

def clean(self, value):
        """Cleans and returns the given value, or raises a ParameterNotValidError exception"""

        if isinstance(value, six.string_types) and value.lower() == 'false':
            return False

        return bool(value)