def get_title_id(url: str=None) ->str:
    """
    Returns the ID number from a given MangaDex title URL.

    Parameters:
        url (str): MangaDex title URL

    Returns:
        str: MangaDex title ID number
    """
    if url is None or 'mangadex.' not in url or '/title/' not in url:
        return ''
    start = url.index('/title/') + 1
    start = url.index('/', start) + 1
    try:
        end = url.index('/', start)
    except ValueError:
        end = len(url)
    try:
        id = int(url[start:end])
    except ValueError:
        return ''
    return str(id)
