from typing import Optional
from typing import Any


def safe_ith(arr: Optional[list], ind: int, default: Any = None) -> Optional[Any]:
    """Performs safe index access. If array is None, returns default."""
    if arr is not None:
        return arr[ind]
    return default