Checks that the variables exist