boolean (@NotNull ArrayReference optionalTrace) { final Value isPresentFlag = optionalTrace.getValue(0); if (isPresentFlag instanceof ArrayReference) { final Value isPresentValue = ((ArrayReference)isPresentFlag).getValue(0); if (isPresentValue instanceof BooleanValue) { return ((BooleanValue)isPresentValue).value(); } } throw new UnexpectedValueTypeException("unexpected format for optional isPresent value"); }