Fixed an NPE due to a race condition while processing pending network configurations on multiple nodes concurrently.

Change-Id: I4a37adc8d059f63115517dbe628233d1fd295d02
diff --git a/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
index 64beb93..315d570 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
@@ -132,8 +132,12 @@
         ImmutableSet.copyOf(configs.keySet()).forEach(k -> {
             if (Objects.equals(k.configKey, configFactory.configKey()) &&
                     isAssignableFrom(configFactory, k)) {
-                validateConfig(k, configFactory, configs.get(k).value());
-                configs.remove(k); // Prune whether valid or not
+                // Prune whether valid or not
+                Versioned<JsonNode> versioned = configs.remove(k);
+                // Allow for the value to be processed by another node already
+                if (versioned != null) {
+                    validateConfig(k, configFactory, versioned.value());
+                }
             }
         });
     }