Fix test check for Math.random() result

0 is a valid value for Math.random() to return.