### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

I don't have a MRE, but better to tell you what I know than nothing at all: after updating to latest 0.2.x from 0.1.x, I started having this warning. It comes from `lanchain_core/tracers/base.py:399`. I noticed that `chain_run` is of class `RunTree` rather than `Run`, it looks like `self.run_map` in that function contains a mix of `Run` and `RunTree` objects, of which only the `Run` objects have an `events` defined?

![image](https://github.com/langchain-ai/langchain/assets/8631181/f068df53-8246-40ab-80f1-17224bce0858)

### Error Message and Stack Trace (if applicable)

_No response_

### Description

See above

### System Info

System Information
------------------
> OS:  Linux
> OS Version:  #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 11:49:30 +0000
> Python Version:  3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]

Package Information
-------------------
> langchain_core: 0.2.3
> langchain: 0.2.1
> langchain_community: 0.2.1
> langsmith: 0.1.65
> langchain_cli: 0.0.24
> langchain_cohere: 0.1.5
> langchain_mongodb: 0.1.5
> langchain_openai: 0.1.8
> langchain_text_splitters: 0.2.0
> langchainhub: 0.1.17
> langgraph: 0.0.59
> langserve: 0.2.1   
[2024-05-31 11:06:20,219: WARNING] langchain_core.callbacks.manager: Error in LangChainTracer.on_chain_end callback: AttributeError("'NoneType' object has no attribute 'append'")
This is a GitHub Issue
repo:langchain
owner:hwchase17
Title : [2024-05-31 11:06:20,219: WARNING] langchain_core.callbacks.manager: Error in LangChainTracer.on_chain_end callback: AttributeError("'NoneType' object has no attribute 'append'")
Issue date:

--- start body ---
### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

I don't have a MRE, but better to tell you what I know than nothing at all: after updating to latest 0.2.x from 0.1.x, I started having this warning. It comes from `lanchain_core/tracers/base.py:399`. I noticed that `chain_run` is of class `RunTree` rather than `Run`, it looks like `self.run_map` in that function contains a mix of `Run` and `RunTree` objects, of which only the `Run` objects have an `events` defined?

![image](https://github.com/langchain-ai/langchain/assets/8631181/f068df53-8246-40ab-80f1-17224bce0858)

### Error Message and Stack Trace (if applicable)

_No response_

### Description

See above

### System Info

System Information
------------------
> OS:  Linux
> OS Version:  #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 11:49:30 +0000
> Python Version:  3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]

Package Information
-------------------
> langchain_core: 0.2.3
> langchain: 0.2.1
> langchain_community: 0.2.1
> langsmith: 0.1.65
> langchain_cli: 0.0.24
> langchain_cohere: 0.1.5
> langchain_mongodb: 0.1.5
> langchain_openai: 0.1.8
> langchain_text_splitters: 0.2.0
> langchainhub: 0.1.17
> langgraph: 0.0.59
> langserve: 0.2.1   
--- end body ---
