Avoid throwing NPE in Connection.extractMessage

JAVA-133 #fixes