from typing import Optional


def validate_charge_rate(charge_rate: Optional[float]) -> Optional[float]:
    """
    Validates the charge rate of an object.
    Charge rate is always optional.

    :param charge_rate: The charge rate of the object.
    :return: The validated charge rate.
    """
    if charge_rate is None:
        return None

    if charge_rate < 0 or charge_rate > 1:
        raise ValueError("Charge rate must be between 0 and 1.")

    return charge_rate