fix "foreach in null" should execute 0 times