[#86933] Validate quantity values

This should avoid the `nil can't be coerced into BigDecimal` exceptions we were seeing.