stats: don't crash when ratio is Inf or None