code: protected void checkEsInvalidAggregation(String name, Object value) {
          if (value == null || (value instanceof String && ((String) value).isEmpty())) {
              String msg = "Cannot register null or empty aggregation: name=" + name + " value=" + value;
              throw new InvalidQueryRegisteredException(msg);
          }
      }
docs: =============