Se il linguaggio e` JS (come sembra):

if ((totOre == 0) && (totOre !="NaN"))