isnan check

isnan check
Merge pull request #301 from Divran/master

isnan checks