Fix MetricsServlet not work issue
Guard against misuse of MetricsSystem methods.