def METHOD_NAME(self, item: t.Any, enum: t.Any) -> t.Any:
    """Validate enum parameter of method in subclasses of BaseProvider.
    :param item: Item of enum object.
    :param enum: Enum object.
    :return: Value of item.
    :raises NonEnumerableError: if ``item`` not in ``enum``.
    """
    if item is None:
        result = self.random.choice_enum_item(enum)
    elif item and isinstance(item, enum):
        result = item
    else:
        raise NonEnumerableError(enum)
    return result.value