[BZ 1126495] handle aggregate metrics with NaN as a value