Refactor and add mathcheck

I would write the if statement in several lines. Generally we use one single line when there's only a then condition and it's single line.

```
if math.random() < 0.2 then 
    return math.random(-2^31, 2^32 - 1)
else 
    return utils.choose({ 0, 1, -2^31, 2^32-1, 2^31-1 })
end
```
I think is more readable this way.