util: Report ValuError (not TypeError) for failed integer conversions.