Fail fast in ASTHelper.getType()