Add a bunch of checks before adding variables to the compiler