Fix: resolve NPE when inject non-existing compute node through SONA

Change-Id: I4b828c0c8e303bc1c27854899a5dc568a8be55cb
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java
index 0c2ea39..14ee117 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHostProvider.java
@@ -292,6 +292,9 @@
         public boolean isRelevant(OpenstackNodeEvent event) {
             // do not allow to proceed without mastership
             Device device = deviceService.getDevice(event.subject().intgBridge());
+            if (device == null) {
+                return false;
+            }
             return mastershipService.isLocalMaster(device.id());
         }