Safer server isConnected check