diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index d09accfe505..57888f32ca5 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -386,7 +386,7 @@ body
html += "
"
var/index = 1
for(var/entry in L)
- if(istext(entry))
+ if(!isnum(entry) && !isnull(L[entry]))
html += debug_variable(entry, L[entry], level + 1)
else
html += debug_variable(index, L[index], level + 1)