from typing import Optional


def readInt(val: str) -> Optional[int]:
    """
    Get an int from a string, or None it the string does not reprsent a number.
    """
    try:
        return int(val)
    except ValueError:
        return None