def serialize_value(value):
    """Attempts to convert `value` into an ISO8601-compliant timestamp string.
    If `value` is ``None``, ``None`` will be returned.

    Args:
        value: A datetime.datetime value.

    Returns:
        An ISO8601 formatted timestamp string.

    """
    if not value:
        return None
    return value.isoformat()