Improved vartype inferface