Handle empty message tree state
diff --git a/website/src/components/Stats/Stats.tsx b/website/src/components/Stats/Stats.tsx
index f12cafa609..39755d9d33 100644
--- a/website/src/components/Stats/Stats.tsx
+++ b/website/src/components/Stats/Stats.tsx
@@ -30,6 +30,11 @@ export const Stats = ({ data }: StatsProps) => {
 
   const messageTreeStats = getStatByName("message_trees_states_by_lang");
 
+  // this will be empty on a fresh db:
+  if (!messageTreeStats) {
+    return null;
+  }
+
   return (
     <>
       <Heading size="lg" className="pb-4">

This problem happens when running with a fresh DB setup, the returned tree is empty.