I think you should rename the local variable to `primitive`, and not use `type` when you mean primitive.. to avoid confusion in the future when types are added.