Fix: harden the post-on-board K8S node state check logic

Change-Id: I04bf5c20c92064c75816b864a51ea6ac3b4eac38
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/K8sNodeWebResource.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/K8sNodeWebResource.java
index 042e932..df4f63f 100644
--- a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/K8sNodeWebResource.java
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/K8sNodeWebResource.java
@@ -283,7 +283,12 @@
         long numOfReadyNodes = nodeAdminService.nodes().stream()
                 .filter(n -> n.state() == POST_ON_BOARD)
                 .count();
-        boolean result = numOfAllNodes == numOfReadyNodes;
+        boolean result;
+        if (numOfAllNodes == 0) {
+            result = false;
+        } else {
+            result = numOfAllNodes == numOfReadyNodes;
+        }
 
         return ok(mapper().createObjectNode().put(RESULT, result)).build();
     }