Add IfStatment test for traverse