def _caseless_key_in_dict(index: str, dictionary: dict) ->bool:
    """Return True if index is a key of dictionary ignoring casing."""
    for key in dictionary:
        if isinstance(key, str) and index.lower() == key.lower():
            return True
    return False
