class ConditionChecker {

    @Nullable
    public static <T> T checkArgument(@Nullable final T argument, final Predicate<T> argumentPredicate) {
        if (!argumentPredicate.test(argument)) {
            throw new IllegalArgumentException("The argument is invalid!");
        }
        return argument;
    }

    private  ConditionChecker();

}