Avoids malformed presence packet to disconnect xmpp connection.