def to_int(thing):
if is_digit(thing):<EOL><INDENT>return int(thing)<EOL><DEDENT>return None<EOL>
coverts an object to int

        >>> to_int("0")
        0
        >>> to_int(1)
        1
        >>> to_int("1")
        1
        >>> to_int("a")