Here is a minimum-reproducible code:
class _Spec:
data = Checker([LIST_OF], LIST_OF=Optional[str])
validate_data_spec({'data': ['str', None]}, _Spec)
# TypeError: field: _Spec.data, reason: ['str', None] is not a spec of <class '__main__._Spec'>, detail: AttributeError('find')
tried with str | None
class _Spec:
data = Checker([LIST_OF], LIST_OF=None | str)
validate_data_spec({'data': ['str', None]}, _Spec)
# TypeError: field: _Spec.data, reason: ['str', None] is not a spec of <class '__main__._Spec'>, detail: AttributeError("'types.UnionType' object has no attribute 'find'")