Slight modification to validity check for adding new wormholes