'Check that max_num is an integer.'

def _check_max_num(self, obj):

    if (obj.max_num is None):
        return []
    elif (not isinstance(obj.max_num, int)):
        return must_be('an    integer', option='max_num', obj=obj, id='admin.E204')
    else:
        return []
