Correctly handle Object/xsd:anyType return types