NaN Detector

I was thinking this might work, but if I’m pulling in packages, do I need to go into each package and define this?