Treat null, undefined, and NaN as viral contaigons

This adds NaN to the list of invalid inputs for operators, such that
they will all propagate as undefined.