Added checking whether mActivity is null.

mActivity is cleared after `onStop` is invoked. Because
`resolveConnectResult` can be invoked after `onStop` and
uses mActivity, null pointer exception may occur. So we
have to check that mActivity is not null.