Fixed NaN bug in inverseMap when evaluate is called with certain types of values (credit: Jason Kao)