Use Google guava's Preconditions to validate arguments where necessary.