Replace nan(not a number) rgb values with a valid value?

Is there any way to replace rgb values of 1.#qnan (rounded to 1.#qnb) with a specific valid value? Can any of the composite nodes mask these out or does blender just let these nans just pass all the way through unaffected by any node?

Basically I need to convert any rgb values which are nans to 1.

1 Like