verify nodes before optimizing them