Protect tgraph from nan's.