use isnan.
Merge branch 'templates'