presto-spi/src/main/java/io/prestosql/spi/predicate/Domain.java/Domain/getNullableSingleValue
class Domain:    public Object getNullableSingleValue()
    {
        if (!isNullableSingleValue()) {
            throw new IllegalStateException("Domain is not a nullable single value");
        }

        if (nullAllowed) {
            return null;
        }
        else {
            return values.getSingleValue();
        }
    }