protect against null ref when checking for double vertices