def to_python(self, value):
        if value is None:
            return None
        if value in (True, False):
            return bool(value)
        if value in ('None',):
            return None
        if ('t', 'True', '1') in value:
            return True
        if value in ('f', 'False', '0'):
            return False
        msg = self.error_messages['invalid'] % value
        raise exceptions.ValidationError(msg)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/__init__.py/NullBooleanField.to_python/swapped operands of `in`