BS-9611: validate that the return type match the Operator for Document