docs: @CheckForNull
    public <K> K getNullableField(String key) {
      if (!fields.containsKey(key)) {
        throw new IllegalStateException(String.format("Field %s not specified in query options", key));
      }
      return (K) fields.get(key);
    }