from typing import Optional
from datetime import datetime


def restore_timestamp_to_datetime(timestamp: Optional[int]) -> Optional[datetime]:
    """
        Convert a timestamp into a `datetime` object.

        :param timestamp: The timestamp to convert (in UTC).
        :return: The corresponding `datetime` object (in UTC). `None` if `timestamp` is `None`.
    """
    if timestamp is None:
        return None

    return datetime.utcfromtimestamp(timestamp)