Java preconditions checks extracted from Guava library