check connection before using mClient

check connection before using mClient.
otherwise may get NPE.