Function path and check implementation if the value are infinite or NAN

Hello
I write functionPath,for function which get floats and makes some calculations for them ,can I add in the functionPath check if this float values are infinite or NAN if yes what is the best way to do it.Thank you
Yakov