 
 (defn get-data
   [store id]
-  (let [id (identify id)
-        node (-get-node store id)]
-    (some->
-      (:data node)
-      (vary-meta assoc
-        :merkledag.node/id id
-        :merkledag.node/links (:links node)))))
+  (when-let [id (identify id)]
+    (let [node (-get-node store id)]
+      (some->
+        (:data node)
+        (vary-meta assoc
+          :merkledag.node/id id
+          :merkledag.node/links (:links node))))))
 
 
 (defn store-node!


(defn delete-node!
  [store id]
  (-delete-node! store (identify id)))


(defrecord MemoryNodeStore


(extend-protocol Identifiable

  nil
  (identify [_] nil)

  multihash.core.Multihash
  (identify [m] m)

  blocks.data.Block
  (identify [b] (:id b))

  merkledag.link.MerkleLink
  (identify [l] (:target l)))


(defprotocol NodeStore
