Fix a NPE in Weighted QuickUnion