from typing import List


def binary_search(arr: List[int], x: int) -> bool:
    """Checks if a number is in a list of numbers.

    Args:
        arr (List[int]): List of numbers.
        x (int): Number to search.

    Returns:
        bool: If the number is in the list.
    """
    start, end = 0, len(arr) - 1
    while True:
        middle = (start + end) // 2
        if start > end:
            return False
        if arr[middle] == x:
            return True
        elif arr[middle] > x:
            end = middle - 1
        elif arr[middle] < x:
            start = middle + 1