from typing import Optional


def verify_input_date_format(date: Optional[str]) -> Optional[str]:
    """
    Make sure a date entered by the user is in the correct string format (with a Z at the end).

    Args:
        date (str): Date string given by the user. Can be None.

    Returns:
        str: Fixed date in the same format as the one needed by the API.
    """
    if date and not date.endswith('Z'):
        date += 'Z'
    return date