Add handling of invalid MetricStates in Shared/Producer metrics