Added assert method for AST