from typing import Optional


def validate_ref_component_optional(ref_component: Optional[int]) -> Optional[int]:
    """
    Validates the reference to a component of an object.

    :param ref_component: The reference to a component of the object.
    :return: The validated reference to a component.
    """
    if ref_component is None:
        return None

    if ref_component <= 0:
        raise ValueError("Reference to a component must be positive.")

    return ref_component