minor refactor: slightly earlier return for some AST transform validation checks