[tor-commits] [stem/master] Optimize error check for non-negative inputs