Cast values of number and range inputs to Number