code: public static void markMeter(Optional<Meter> meter, final long value) {
      meter.transform(new Function<Meter, Meter>() {
        @Override
        public Meter apply(@Nonnull Meter input) {
          input.mark(value);
          return input;
        }
      });
    }
docs: Marks a meter only if it is defined.
  @param meter an Optional&lt;{@link com.codahale.metrics.Meter}&gt;
  @param value value to mark