Let's just having bucketNum be an Integer that can be null then. Having a utility method isn't necessary then.