Update iternotate.py

extra checks in place.