def to_id(item) -> str:
    """
    method for getting an id from an item
    :param item: the item to get the id from
    :return: the id fo the item
    """
    if item is not None:
        return item.id
    else:
        return ''