Fix NPE when setting strict if there are no links present

Change-Id: Ic43d8807d5d2a86a3f716214c7fcf5a00f1e9477
diff --git a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
index 845518e..9859e37 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
@@ -493,8 +493,12 @@
             if (linkDiscoveryMode == LinkDiscoveryMode.STRICT) {
                 // Remove any previous links to force them to go through the strict
                 // discovery process
-                linkDescriptions.clear();
-                links.clear();
+                if (linkDescriptions != null) {
+                    linkDescriptions.clear();
+                }
+                if (links != null) {
+                    links.clear();
+                }
             }
             log.debug("config set link discovery mode to {}",
                       linkDiscoveryMode.name());