[JBIDE-16516] added null-check before doing connection#isConnected