model.js; add a test on value before using it

Link to #4394
13 jobs for feature-c/4394-loadanalysis-error-top-order in 11 minutes and 5 seconds (queued for 4 seconds)