Use an if comparison instead of NSAssert

There is no point for using NSAssert here.
If connection has not been stablished yet, messesage should be ignored instead of forcing the app to crash.
Use an if comparison instead of NSAssert