Javascript - failing to deal with empty cell

No rush. I have inserted a Replace transform before the javascript, which simplifies the latter greatly. Thanks to noticing the use of .toFixed() by Anonymous here I also save a subsequent Num Format so it breaks evenly.