from typing import Optional


def get_command_id(command_name: str) -> Optional[int]:
    """
    Return ID of command with a given name.

    Parameters
    ----------
    command_name : str
        Command name. Perhaps, id-string

    Returns
    -------
    command_id : int or None
        Command ID, or None if name can't be found.
    """
    command_id = RPR.NamedCommandLookup(command_name)  # type:ignore
    command_id = command_id if command_id else None
    return command_id