avoid NullPointerException when second argument to name function of MetricRegistry class is null