Check for null session in _publish_msg and _session)default