Solved by tom in post #2 
              
              
                .to is a great way to cast the type. 
type is one of these odd legacy functions that haven’t been properly deprecated - I would probably not use it in any of my projects.