docs: @SuppressWarnings("unchecked")
    protected <T extends Meter> T getOrCreate(Id id, Class<T> cls, T dflt, Function<Id, T> factory) {
      try {
        Preconditions.checkNotNull(id, "id");
        Meter m = Utils.computeIfAbsent(meters, id, i -> compute(factory.apply(i), dflt));
        if (!cls.isAssignableFrom(m.getClass())) {
          logTypeError(id, cls, m.getClass());
          m = dflt;
        }
        return (T) m;
      } catch (Exception e) {
        propagate(e);
        return dflt;
      }
    }