Some sanity checks for aliases (undeclared variable checks, and incompatible types in alias checks.)