public static boolean assertType(final Value value, final Predicate<Value> test, final String wantedType) {
        if (value == null) {
            throw new FormulaException(WRONG_TYPE, wantedType, "<empty>", "<empty>");
        }
        if (test != null && !test.test(value)) {
            throw new FormulaException(WRONG_TYPE, wantedType, value.toUserDisplayableString(), value.getType());
        }
        return true;
    }
Encapsulates a single value for handling in {@link Formula}. Provides e.g. type conversions.
<br>
Supports raw values of type String, CharSequence, Double, Long, BigInterger and BigDecimal
main/src/main/java/cgeo/geocaching/utils/formulas/Value.java