diff --git a/apps/castor/src/main/java/org/onosproject/castor/CastorArpManager.java b/apps/castor/src/main/java/org/onosproject/castor/CastorArpManager.java
index ff7ec6b..d471ff2 100644
--- a/apps/castor/src/main/java/org/onosproject/castor/CastorArpManager.java
+++ b/apps/castor/src/main/java/org/onosproject/castor/CastorArpManager.java
@@ -244,7 +244,7 @@
      */
     private void updateMac(MessageContext context) {
 
-        if ((castorStore.getAddressMap()).containsKey(context.sender())) {
+        if (castorStore.getMacAddress(context.sender) != null) {
             return;
         }
         Ethernet eth = context.packet();
diff --git a/apps/castor/src/main/java/org/onosproject/castor/CastorStore.java b/apps/castor/src/main/java/org/onosproject/castor/CastorStore.java
index 03bba7b..846ebb5 100644
--- a/apps/castor/src/main/java/org/onosproject/castor/CastorStore.java
+++ b/apps/castor/src/main/java/org/onosproject/castor/CastorStore.java
@@ -78,6 +78,17 @@
      */
     Map<IpAddress, MacAddress> getAddressMap();
 
+
+    /**
+     * Get MacAddress from addressMap. Returns null if `ip` is
+     * not found.
+     *
+     * @param ip IP Address
+     *
+     * @return Corresponding MacAddress or null
+     */
+    MacAddress getMacAddress(IpAddress ip);
+
     /**
      * Sets the mapping from IP address to Mac.
      *
diff --git a/apps/castor/src/main/java/org/onosproject/castor/CastorWebResource.java b/apps/castor/src/main/java/org/onosproject/castor/CastorWebResource.java
index 37630cf..79b5adc 100644
--- a/apps/castor/src/main/java/org/onosproject/castor/CastorWebResource.java
+++ b/apps/castor/src/main/java/org/onosproject/castor/CastorWebResource.java
@@ -82,8 +82,8 @@
             ObjectMapper mapper = new ObjectMapper();
             Peer peer = mapper.readValue(incomingData, Peer.class);
             get(ConnectivityManagerService.class).setUpConnectivity(peer);
-            if ((get(CastorStore.class)).getAddressMap()
-                    .get(IpAddress.valueOf(peer.getIpAddress())) != null) {
+            if ((get(CastorStore.class))
+                    .getMacAddress(IpAddress.valueOf(peer.getIpAddress())) != null) {
                 get(ConnectivityManagerService.class).setUpL2(peer);
             } else {
                 get(ArpService.class).createArp(peer);
diff --git a/apps/castor/src/main/java/org/onosproject/castor/ConnectivityManager.java b/apps/castor/src/main/java/org/onosproject/castor/ConnectivityManager.java
index 5125ce3..1e067fc 100644
--- a/apps/castor/src/main/java/org/onosproject/castor/ConnectivityManager.java
+++ b/apps/castor/src/main/java/org/onosproject/castor/ConnectivityManager.java
@@ -330,7 +330,7 @@
             }
         }
         TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
-        MacAddress macAddress = castorStore.getAddressMap().get(IpAddress.valueOf(peer.getIpAddress()));
+        MacAddress macAddress = castorStore.getMacAddress(IpAddress.valueOf(peer.getIpAddress()));
         selector.matchEthDst(macAddress);
         TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
         Key key = Key.of(peer.getIpAddress(), appId);
diff --git a/apps/castor/src/main/java/org/onosproject/castor/DistributedCastorStore.java b/apps/castor/src/main/java/org/onosproject/castor/DistributedCastorStore.java
index 3a1a98c..b38c23f 100644
--- a/apps/castor/src/main/java/org/onosproject/castor/DistributedCastorStore.java
+++ b/apps/castor/src/main/java/org/onosproject/castor/DistributedCastorStore.java
@@ -157,6 +157,11 @@
     }
 
     @Override
+    public MacAddress getMacAddress(IpAddress ip) {
+        return Versioned.valueOrNull(addressMap.get(ip));
+    }
+
+    @Override
     public void setAddressMap(IpAddress ip, MacAddress mac) {
         addressMap.put(ip, mac);
     }
