def is_int(string):
    """Check if a string is a digit.

    string : str
        Input string to check.

    Returns
    -------
    bool
        True on success, False on exception.
    """
    try:
        int(string)
        return True
    except Exception:
        return False
