handshakeFuture can be null

If the if clause fails before it has ever succeeded, handshakeFuture
will be null, the test for isDone then fails.

BugzID: 18623