Fix null pointer exception in multiaddr