def try_get_value_case_insensitive(d, key_name):
    """
    Look in a dictionary for a key with the given key_name, without concern
    for case, and return the value of the first key found, or None.
    """
    for name, value in d.items():
        if name.lower() == key_name.lower():
            return value
    return None