added type checking for var, set, ifx