Add unit getter functions

Allow getting prefixed units, i.e. with `a=1m`, it is possible to say
`a.mm`or `a.nm`