Open
Description
This is found when applying nullable annotations.
Internal docs of XmlQueryType.SchemaType mention that this property should never return null and should return AnyType instead but inside of ChoiceType for certain node types (i.e. Item, Node) we do return null which may cause NRE for some input XML schemas.
We should attempt to create a repro first (to validate this is even possible) and add it as a test before fixing this.