def to_int(answer):
    """ Converts user input to integer if conversion is not possible None is returned. """
    try:
        answer = int(answer)
    except ValueError:
        return None

    return answer