Prevent NullPointException because of null protoConnection