Update utils.js

Put > 0 case first, special case second