Wraps a function to return NaN if it throws an error
The function to wrap
A new function that returns NaN if the original function throws an error
Wraps a function to return NaN if it throws an error