Check is websocket connection is available before sending on it.