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