diff --git a/agent_based/bgp_peer.py b/agent_based/bgp_peer.py
index 0427531a4b1e2b6a45c72447df8b0b203efcdc82..804bda1ca1679bfe7db1bf8b11e8efdbd1fbe624 100644
--- a/agent_based/bgp_peer.py
+++ b/agent_based/bgp_peer.py
@@ -28,6 +28,7 @@
 # 2022-09-11: optimized internal flow: > alias > not found > admin down > peer state > ...
 # 2023-01-21: changed to always yield fsm_established_time (not only if beep connects, but also on all other states)
 # 2023-01-22: fix output for admin_state
+# 2023-02-20: fix crash if metric data is None
 #
 
 # Example Agent Output:
@@ -206,7 +207,8 @@ def check_bgp_peer(item, params, section: Dict[str, BgpPeer]) -> CheckResult:
 
     for entry in peer.metric_count:
         key, value = entry
-        yield Metric(name=f'bgp_peer_{key}', value=value, boundaries=(0, None))
+        if value id not None:
+            yield Metric(name=f'bgp_peer_{key}', value=value, boundaries=(0, None))
 
 
 register.snmp_section(