SOAP-966: Avoid nullpointer exception