removed 'isNaN' call to avoid memory allocations (closes #355)