from typing import Any


def terminal(v: Any) -> bool:
    """Detect terminal key ending in type other than non-empty dict or list."""

    if isinstance(v, (dict, list)):
        if v:
            return False
    return True