def int_if_digit(s: str):
    """Iterpret as integer if `s` represents a digit string."""
    try:
        if s.isdigit():
            return int(s)
    except AttributeError:
        pass
    return s
