validate vertex ids implemented and tested

and you can also get rid of the cast once you remove the types args :)