diff --git a/src/mgmt/nfd/face-query-filter.cpp b/src/mgmt/nfd/face-query-filter.cpp
index 904baa4..36a1206 100644
--- a/src/mgmt/nfd/face-query-filter.cpp
+++ b/src/mgmt/nfd/face-query-filter.cpp
@@ -33,16 +33,7 @@
 static_assert(std::is_base_of<tlv::Error, FaceQueryFilter::Error>::value,
               "FaceQueryFilter::Error must inherit from tlv::Error");
 
-FaceQueryFilter::FaceQueryFilter()
-  : m_hasFaceId(false)
-  , m_hasUriScheme(false)
-  , m_hasRemoteUri(false)
-  , m_hasLocalUri(false)
-  , m_hasFaceScope(false)
-  , m_hasFacePersistency(false)
-  , m_hasLinkType(false)
-{
-}
+FaceQueryFilter::FaceQueryFilter() = default;
 
 FaceQueryFilter::FaceQueryFilter(const Block& block)
 {
@@ -55,39 +46,39 @@
 {
   size_t totalLength = 0;
 
-  if (m_hasLinkType) {
+  if (m_linkType) {
     totalLength += prependNonNegativeIntegerBlock(encoder,
-                   tlv::nfd::LinkType, m_linkType);
+                   tlv::nfd::LinkType, *m_linkType);
   }
 
-  if (m_hasFacePersistency) {
+  if (m_facePersistency) {
     totalLength += prependNonNegativeIntegerBlock(encoder,
-                   tlv::nfd::FacePersistency, m_facePersistency);
+                   tlv::nfd::FacePersistency, *m_facePersistency);
   }
 
-  if (m_hasFaceScope) {
+  if (m_faceScope) {
     totalLength += prependNonNegativeIntegerBlock(encoder,
-                   tlv::nfd::FaceScope, m_faceScope);
+                   tlv::nfd::FaceScope, *m_faceScope);
   }
 
-  if (m_hasLocalUri) {
+  if (hasLocalUri()) {
     totalLength += encoder.prependByteArrayBlock(tlv::nfd::LocalUri,
-                   reinterpret_cast<const uint8_t*>(m_localUri.c_str()), m_localUri.size());
+                   reinterpret_cast<const uint8_t*>(m_localUri.data()), m_localUri.size());
   }
 
-  if (m_hasRemoteUri) {
+  if (hasRemoteUri()) {
     totalLength += encoder.prependByteArrayBlock(tlv::nfd::Uri,
-                   reinterpret_cast<const uint8_t*>(m_remoteUri.c_str()), m_remoteUri.size());
+                   reinterpret_cast<const uint8_t*>(m_remoteUri.data()), m_remoteUri.size());
   }
 
-  if (m_hasUriScheme) {
+  if (hasUriScheme()) {
     totalLength += encoder.prependByteArrayBlock(tlv::nfd::UriScheme,
-                   reinterpret_cast<const uint8_t*>(m_uriScheme.c_str()), m_uriScheme.size());
+                   reinterpret_cast<const uint8_t*>(m_uriScheme.data()), m_uriScheme.size());
   }
 
-  if (m_hasFaceId) {
+  if (m_faceId) {
     totalLength += prependNonNegativeIntegerBlock(encoder,
-                   tlv::nfd::FaceId, m_faceId);
+                   tlv::nfd::FaceId, *m_faceId);
   }
 
   totalLength += encoder.prependVarNumber(totalLength);
@@ -120,7 +111,7 @@
 void
 FaceQueryFilter::wireDecode(const Block& block)
 {
-  //all fields are optional
+  // all fields are optional
   if (block.type() != tlv::nfd::FaceQueryFilter) {
     BOOST_THROW_EXCEPTION(Error("expecting FaceQueryFilter block"));
   }
@@ -131,67 +122,71 @@
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceId) {
     m_faceId = readNonNegativeInteger(*val);
-    m_hasFaceId = true;
     ++val;
   }
   else {
-    m_hasFaceId = false;
+    m_faceId = nullopt;
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::UriScheme) {
     m_uriScheme.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
-    m_hasUriScheme = true;
     ++val;
   }
   else {
-    m_hasUriScheme = false;
+    m_uriScheme.clear();
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
     m_remoteUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
-    m_hasRemoteUri = true;
     ++val;
   }
   else {
-    m_hasRemoteUri = false;
+    m_remoteUri.clear();
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
     m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
-    m_hasLocalUri = true;
     ++val;
   }
   else {
-    m_hasLocalUri = false;
+    m_localUri.clear();
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
     m_faceScope = static_cast<FaceScope>(readNonNegativeInteger(*val));
-    m_hasFaceScope = true;
     ++val;
   }
   else {
-    m_hasFaceScope = false;
+    m_faceScope = nullopt;
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
     m_facePersistency = static_cast<FacePersistency>(readNonNegativeInteger(*val));
-    m_hasFacePersistency = true;
     ++val;
   }
   else {
-    m_hasFacePersistency = false;
+    m_facePersistency = nullopt;
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
     m_linkType = static_cast<LinkType>(readNonNegativeInteger(*val));
-    m_hasLinkType = true;
     ++val;
   }
   else {
-    m_hasLinkType = false;
+    m_linkType = nullopt;
   }
+}
 
+bool
+FaceQueryFilter::empty() const
+{
+  return !this->hasFaceId() &&
+         !this->hasUriScheme() &&
+         !this->hasRemoteUri() &&
+         !this->hasLocalUri() &&
+         !this->hasFaceScope() &&
+         !this->hasFacePersistency() &&
+         !this->hasLinkType();
 }
 
 FaceQueryFilter&
@@ -199,7 +194,6 @@
 {
   m_wire.reset();
   m_faceId = faceId;
-  m_hasFaceId = true;
   return *this;
 }
 
@@ -207,7 +201,7 @@
 FaceQueryFilter::unsetFaceId()
 {
   m_wire.reset();
-  m_hasFaceId = false;
+  m_faceId = nullopt;
   return *this;
 }
 
@@ -216,16 +210,13 @@
 {
   m_wire.reset();
   m_uriScheme = uriScheme;
-  m_hasUriScheme = true;
   return *this;
 }
 
 FaceQueryFilter&
 FaceQueryFilter::unsetUriScheme()
 {
-  m_wire.reset();
-  m_hasUriScheme = false;
-  return *this;
+  return this->setUriScheme("");
 }
 
 FaceQueryFilter&
@@ -233,16 +224,13 @@
 {
   m_wire.reset();
   m_remoteUri = remoteUri;
-  m_hasRemoteUri = true;
   return *this;
 }
 
 FaceQueryFilter&
 FaceQueryFilter::unsetRemoteUri()
 {
-  m_wire.reset();
-  m_hasRemoteUri = false;
-  return *this;
+  return this->setRemoteUri("");
 }
 
 FaceQueryFilter&
@@ -250,16 +238,13 @@
 {
   m_wire.reset();
   m_localUri = localUri;
-  m_hasLocalUri = true;
   return *this;
 }
 
 FaceQueryFilter&
 FaceQueryFilter::unsetLocalUri()
 {
-  m_wire.reset();
-  m_hasLocalUri = false;
-  return *this;
+  return this->setLocalUri("");
 }
 
 FaceQueryFilter&
@@ -267,7 +252,6 @@
 {
   m_wire.reset();
   m_faceScope = faceScope;
-  m_hasFaceScope = true;
   return *this;
 }
 
@@ -275,7 +259,7 @@
 FaceQueryFilter::unsetFaceScope()
 {
   m_wire.reset();
-  m_hasFaceScope = false;
+  m_faceScope = nullopt;
   return *this;
 }
 
@@ -284,7 +268,6 @@
 {
   m_wire.reset();
   m_facePersistency = facePersistency;
-  m_hasFacePersistency = true;
   return *this;
 }
 
@@ -292,7 +275,7 @@
 FaceQueryFilter::unsetFacePersistency()
 {
   m_wire.reset();
-  m_hasFacePersistency = false;
+  m_facePersistency = nullopt;
   return *this;
 }
 
@@ -301,7 +284,6 @@
 {
   m_wire.reset();
   m_linkType = linkType;
-  m_hasLinkType = true;
   return *this;
 }
 
@@ -309,7 +291,7 @@
 FaceQueryFilter::unsetLinkType()
 {
   m_wire.reset();
-  m_hasLinkType = false;
+  m_linkType = nullopt;
   return *this;
 }
 
diff --git a/src/mgmt/nfd/face-query-filter.hpp b/src/mgmt/nfd/face-query-filter.hpp
index 9ed1226..a7831a5 100644
--- a/src/mgmt/nfd/face-query-filter.hpp
+++ b/src/mgmt/nfd/face-query-filter.hpp
@@ -67,19 +67,23 @@
   void
   wireDecode(const Block& wire);
 
-public: // getters & setters
+  /** \return whether the filter is empty
+   */
+  bool
+  empty() const;
 
+public: // getters & setters
   bool
   hasFaceId() const
   {
-    return m_hasFaceId;
+    return !!m_faceId;
   }
 
   uint64_t
   getFaceId() const
   {
     BOOST_ASSERT(this->hasFaceId());
-    return m_faceId;
+    return *m_faceId;
   }
 
   FaceQueryFilter&
@@ -91,7 +95,7 @@
   bool
   hasUriScheme() const
   {
-    return m_hasUriScheme;
+    return !m_uriScheme.empty();
   }
 
   const std::string&
@@ -110,7 +114,7 @@
   bool
   hasRemoteUri() const
   {
-    return m_hasRemoteUri;
+    return !m_remoteUri.empty();
   }
 
   const std::string&
@@ -129,7 +133,7 @@
   bool
   hasLocalUri() const
   {
-    return m_hasLocalUri;
+    return !m_localUri.empty();
   }
 
   const std::string&
@@ -148,14 +152,14 @@
   bool
   hasFaceScope() const
   {
-    return m_hasFaceScope;
+    return !!m_faceScope;
   }
 
   FaceScope
   getFaceScope() const
   {
     BOOST_ASSERT(this->hasFaceScope());
-    return m_faceScope;
+    return *m_faceScope;
   }
 
   FaceQueryFilter&
@@ -167,14 +171,14 @@
   bool
   hasFacePersistency() const
   {
-    return m_hasFacePersistency;
+    return !!m_facePersistency;
   }
 
   FacePersistency
   getFacePersistency() const
   {
     BOOST_ASSERT(this->hasFacePersistency());
-    return m_facePersistency;
+    return *m_facePersistency;
   }
 
   FaceQueryFilter&
@@ -186,14 +190,14 @@
   bool
   hasLinkType() const
   {
-    return m_hasLinkType;
+    return !!m_linkType;
   }
 
   LinkType
   getLinkType() const
   {
     BOOST_ASSERT(this->hasLinkType());
-    return m_linkType;
+    return *m_linkType;
   }
 
   FaceQueryFilter&
@@ -203,21 +207,13 @@
   unsetLinkType();
 
 private:
-  uint64_t m_faceId;
+  optional<uint64_t> m_faceId;
   std::string m_uriScheme;
   std::string m_remoteUri;
   std::string m_localUri;
-  FaceScope m_faceScope;
-  FacePersistency m_facePersistency;
-  LinkType m_linkType;
-
-  bool m_hasFaceId;
-  bool m_hasUriScheme;
-  bool m_hasRemoteUri;
-  bool m_hasLocalUri;
-  bool m_hasFaceScope;
-  bool m_hasFacePersistency;
-  bool m_hasLinkType;
+  optional<FaceScope> m_faceScope;
+  optional<FacePersistency> m_facePersistency;
+  optional<LinkType> m_linkType;
 
   mutable Block m_wire;
 };
diff --git a/tests/unit-tests/mgmt/nfd/face-query-filter.t.cpp b/tests/unit-tests/mgmt/nfd/face-query-filter.t.cpp
index 7e91b8d..d8dbc67 100644
--- a/tests/unit-tests/mgmt/nfd/face-query-filter.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/face-query-filter.t.cpp
@@ -84,6 +84,7 @@
 BOOST_AUTO_TEST_CASE(Equality)
 {
   FaceQueryFilter filter1, filter2;
+  BOOST_CHECK_EQUAL(filter1.empty(), true);
   BOOST_CHECK_EQUAL(filter1, filter2);
 
   filter1.setFaceId(100)
@@ -93,6 +94,7 @@
          .setFaceScope(FACE_SCOPE_LOCAL)
          .setFacePersistency(FACE_PERSISTENCY_ON_DEMAND)
          .setLinkType(LINK_TYPE_MULTI_ACCESS);
+  BOOST_CHECK_EQUAL(filter1.empty(), false);
   BOOST_CHECK_NE(filter1, filter2);
 
   filter2 = filter1;
