Add null check for events on reconnect