diff --git a/unittests/table_json_conversion/test_read_data.py b/unittests/table_json_conversion/test_read_data.py
index 4c75c4bd18247e11bc9970175344135917793103..24700b55c70167c3d1c56cb96c7e27171550a0a8 100644
--- a/unittests/table_json_conversion/test_read_data.py
+++ b/unittests/table_json_conversion/test_read_data.py
@@ -92,8 +92,9 @@ Raise an assertion exception if they are not equal."""
             assert (allow_none and existing is None) or (allow_empty and existing == []), (
                 f"Element at path {this_path} is None or empty in one json and does not exist in "
                 "the other.")
+        return
 
-    assert isinstance(json1, list) and isinstance(json2, list), f"Type mismatch, path: {path}"
+    assert isinstance(json1, list) and isinstance(json2, list), f"Is not a list, path: {path}"
     assert len(json1) == len(json2), f"Lists must have equal length, path: {path}"
     for idx, (el1, el2) in enumerate(zip(json1, json2)):
         this_path = path + [idx]