Refactored integer argument checking code into a helper method. Removes a considerable amount of duplicated code.