parseQuantity is templated on the returned QuantityType