ONOS-5699 Null pointer exception can occur after null checking

Change-Id: Idf53a199c52d14aa73c1a28c374fac75b7d9a214
diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
index a1f9e9b..c6ee95e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
@@ -1119,7 +1119,7 @@
             log.trace("received groupid map event {} for id {} in device {}",
                       mapEvent.type(),
                       group.id(),
-                      key.deviceId());
+                      (key != null ? key.deviceId() : null));
             if (mapEvent.type() == MapEvent.Type.INSERT || mapEvent.type() == MapEvent.Type.UPDATE) {
                 // Update the group ID table
                 getGroupIdTable(group.deviceId()).put(group.id(), group);