Yeah, in some cases it can be the case if the value is really simple but it can also be really usage specific. For example here the compress is a Boolean, so if it's `null` it is interpreted as `false`, which very specific for this case.  Some other logic is more complex , like: 

```
if (includeDefaults || (!indexAnalyzer.name().startsWith("_") && !indexAnalyzer.name().equals("default"))) {
   builder.field("index_analyzer", indexAnalyzer.name());
}
```

We can do some method like this (with variants for all types, this is string):

```
defaultedField(String value, boolean currentValueIsDefault, boolean outputDefaults) { ... }
```

and call it:

```
XContentBuilder.defaultField(indexAnalyzer.name(), !indexAnalyzer.name().startsWith("_") && !indexAnalyzer.name().equals("default")), includeDefaults)
```

IMHO doesn't really help except that it hides the actual meaning of those params. Or did you have anything else in mind?