def json_int(int_string):
    """
    Convert the string to an int or None on error.
    """
    if int_string:
        try:
            return int(int_string)
        except ValueError:
            pass
    return None