Fix errors caused by calling a null function
Fix errors caused by calling a null function

Don't register for the 'connect' event if there is no connectedCallback.

amrynsky/node-stomp-client,kgoerlitz/node-stomp-client,beamly/node-stomp-client