Avoid NPexception on domainId mismatch

Change-Id: Icad4c3e21e92c133efd51423890f30f7137ad6f4
diff --git a/global/http-channel/src/main/java/org/opencord/ce/global/channel/client/HttpClientInstance.java b/global/http-channel/src/main/java/org/opencord/ce/global/channel/client/HttpClientInstance.java
index eb820fb..5190363 100644
--- a/global/http-channel/src/main/java/org/opencord/ce/global/channel/client/HttpClientInstance.java
+++ b/global/http-channel/src/main/java/org/opencord/ce/global/channel/client/HttpClientInstance.java
@@ -112,7 +112,7 @@
     }
 
     private boolean isLeader(String topic) {
-        return leadershipService.getLeader(topic).id()
+        return topic != null && leadershipService.getLeader(topic).id()
                 .equals(clusterService.getLocalNode().id().id());
     }
 
@@ -135,7 +135,11 @@
     }
 
     private String getTopic(DomainId domainId) {
-        return domainsEndPointsMap.get(domainId).getRight().topic();
+        if (domainsEndPointsMap.get(domainId) != null) {
+            return domainsEndPointsMap.get(domainId).getRight().topic();
+        }
+        log.info("Domain ID {} not among configured domain IDs", domainId.id());
+        return null;
     }
 
     private Client createClient() {