def parse_and_validate_latitude(request):
    """Extract and Check the validity of latitude.

    Args:
        request: HTTP request.

    Returns:
        latitude(float) if valid.

    Raises:
        ValueError: if latitude is not float, or outside range [-90, 90].
    """
    lat = float(request.rel_url.query.get("lat"))
    if lat > 90 or lat < -90:
        raise ValueError
    return lat