preventing error when typeElement is undefined

(replaces https://github.com/vpulim/node-soap/pull/514)