Fix error catching

Change-Id: Ibb9f0a8dc3a31a56ac589617c12bdae5b44246a5
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index 7a85dc0..059e638 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -166,7 +166,7 @@
           onload(undefined);
           return;
         };
-	      if (json !== null && json["errors"] !== null) {
+	      if (json !== undefined && json["errors"] !== undefined) {
 	        json["errors"].forEach(
             e => KorAP.log(e[0], e[1] || "Unknown")
 	        );