Adds some helper methods in xmpp protocol and a NPE check.