def strict_get(obj, path: str):
    """
    Strict get dot prop.
    If some level doesn't exist, it raises the apropriate exception.
    """
    value = obj
    for key in path.split('.'):
        if isinstance(value, list):
            value = value[int(key)]
        elif isinstance(value, dict):
            value = value[key]
        else:
            value = getattr(value, key)
    return value
