function v(x) { if (typeof x !== 'number') { console.trace(); throw `Not a numeric type: ${x}`; } if (isNaN(x)) { console.trace(); throw 'NAN result'; } return x; }