SOAP-1407
Added null check & test.