'A helper to check if the given field should be treated as nullable.
Some backends treat \'\' as null and Django treats such fields as
nullable for those backends. In such situations field.null can be
False even if we should treat the field as nullable.'

def is_nullable(self, field):

    if (connections[DEFAULT_DB_ALIAS].features.interprets_empty_strings_as_nulls and field.empty_strings_allowed):
        return True
    else:
        return field.null
