Add some input validation for positive integers.