def convert_to_number(string):
    """
    Tries to cast input into an integer number, returning the
    number if successful and returning False otherwise.
    """
    try:
        number = int(string)
        return number
    except:
        return False