add field nan checking, currently unused (but useful in the future)