Added conditionals in _setMetrics methods around logic that depends on objects for calculation.