Even and Odd Integers

x % 2 == 1 tests that x is both positive and odd all in one go, which is entirely legitimate when the only expected inputs are positive. In no way is such testing of one's assumptions (for free, performance-wise!) bad practice.