can we make this a method somewhere ie.

```Java
private static void checkCoerce(boolean coerce, Class<? extends Number> clazz) {
    if (!coerce) {
        throw new ElasticsearchIllegalArgumentException(clazz.getSimpleName() + " value passed as string");
    }
}
```