checking loop types now handles gotoifnot as well as GoToNode