if (context == null)
throw new IllegalStateException("no context given");
if (readyValue == null) {
if (unreadyValue == null) {
// first evaluation of this expression
readyValue = new Value(underlyingType);
}
else {
// readyValue is null, unreadyValue is not null. Means we've seen a QueryContext but have
// not evaluated it. Set the readyValue to unreadyValue, as we've about to evaluate it.
readyValue = unreadyValue;