def _get_item_by_name(cls, name):
    """
    Gets the item from the corresponding class with the indicated name.
    :param cls: Class / Entity of the item.
    :param name: Case-insensitive name of the item.
    :return: The item if there is a match, None otherwise.
    """
    if name:
        try:
            return cls.get(cls.name == name.lower())
        except cls.DoesNotExist:
            return None
    return None