added type info in variable check