ndn.cxx: Check whether Callback IsNull() for ApiFace
diff --git a/ndn.cxx/detail/pending-interests-container.h b/ndn.cxx/detail/pending-interests-container.h
index 673d33b..b790864 100644
--- a/ndn.cxx/detail/pending-interests-container.h
+++ b/ndn.cxx/detail/pending-interests-container.h
@@ -33,8 +33,14 @@
   void
   AddCallbacks (ApiFace::DataCallback onData, ApiFace::TimeoutCallback onTimeout)
   { 
-    m_dataCallbacks.push_back (onData);
-    m_timeoutCallbacks.push_back (onTimeout);
+    if (! onData.IsNull ())
+      {
+         m_dataCallbacks.push_back (onData);
+      }
+    if (! onTimeout.IsNull ())
+      {
+         m_timeoutCallbacks.push_back (onTimeout);
+      }
   }
 
   void