from typing import Union


def latitude(value: Union[str, float]) -> float:
    """Validate latitude."""
    float_value = float(value)
    if -90 <= float_value <= 90:
        return float_value
    raise ValueError("latitude must be between -90 and 90")