Convert primitives before passing to host language