Actually I consider reverting this. I can't seem to find cvIsNan other than in the documentation.