added type checking rules for variables