since session should be a shared_ptr, first check if it set, then ping:
```
if(session) {
  try { session->ice_ping(); }
  catch (const Ice::Exception &e) { return false; }
}
return true;
```