check if used variables are declared