JSFiddle - React, Tailwind, and code Playground

JavaScript

function f1() {
    return {
        from: 0.5,
        to: null
    };
}

function f2(m) {
    return {
        width: m.to === null ? '' : (m.to - m.from)
    };
}

var i = 50000,
    count = 0;
console.log('start');
while (i--) {
    var m = f1();
    var x = f2(m);
    if (x.width) {
        if (!count) console.log(m.to, '->', x.width);
        count++;
    }
}
console.log(count, 'times evaluated null as 0');