Rather than making this a `var` and mutating to it from outside, it would be better to leave it as a `val`. When you initialize it, check if the master has a metrics servlet and add it if it does. To do this, you might need to pass a reference to the master in the constructor to MasterWebUI.