static <T> ToBigDecimal<T> of(Function<T, BigDecimal> lambda) {
        if (lambda instanceof ToBigDecimal) {
            return (ToBigDecimal<T>) lambda;
        } else {
            return lambda::apply;
        }
    }
Returns a typed {@code ToBigDecimal<T>} using the provided
{@code lambda}.

@param <T> type to extract from
@param lambda to convert
@return a typed {@code ToBigDecimal<T>} using the provided {@code lambda}

@throws NullPointerException if the provided {@code lambda} is
{@code null}
runtime-parent/runtime-compute/src/main/java/com/speedment/runtime/compute/ToBigDecimal.java