from typing import Optional


def validate_shared_potential_id(shared_potential_id: Optional[str]) -> Optional[str]:
    """
    Validates the shared potential id of an object.
    Shared potential id is always optional.

    :param shared_potential_id: The shared potential id of the object.
    :return: The validated shared potential id.
    """
    if shared_potential_id is None:
        # Skip validation if no value provided
        return None

    if len(shared_potential_id) > 100:
        raise ValueError("Shared potential id must not be longer than 100 characters.")

    return shared_potential_id