from typing import List
from typing import Union


def checkIndexByType(results : List[int]) -> Union[int,None]: 
    """Recursively find the first index that is not none

    Args:
        results (List(int)): A list of indexes and none's

    Returns:
        int: The index of the first matching element 
        None: If the element type was not found, it returns None
    """
    if len(results) == 0:
        return None
    if results[0] != None:
        return results[0]
    return checkIndexByType(results[1:])