This validator is using `|` instead of `Union` for its types which breaks in python 3.9 which we still claim to support in the main oss.