from typing import Optional


def validate_discharge_efficiency(discharge_efficiency: Optional[float]) -> Optional[float]:
    """
    Validates the discharge efficiency of an object.
    Discharge efficiency is always optional.

    :param discharge_efficiency: The discharge efficiency of the object.
    :return: The validated discharge efficiency.
    """
    if discharge_efficiency is None:
        return None

    if discharge_efficiency < 0 or discharge_efficiency > 1:
        raise ValueError("Discharge efficiency must be between 0 and 1.")

    return discharge_efficiency