Hi!
It seems that convert(Quantity{T}, x) instead of T(x) does what you need.
convert(Quantity{T}, x)
T(x)