data: Ensure that content block always exists, even content wasn't set explicitly

Before this commit, when setContent was never called on a Data packet,
the library was skipping Content part, which violates the packet format.

Change-Id: Ic175c384c16e828fa40836d952f4688fe3edc311
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 9c2777d..984e8aa 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -90,6 +90,12 @@
    */
   explicit
   Block(uint32_t type, const Block &value);
+
+  /**
+   * @brief Check if the Block is empty
+   */
+  inline bool
+  empty() const;
   
   /**
    * @brief Check if the Block has fully encoded wire
@@ -207,6 +213,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 inline bool
+Block::empty() const
+{
+  return m_type == std::numeric_limits<uint32_t>::max();
+}
+
+
+inline bool
 Block::hasWire() const
 {
   return m_buffer && (m_begin != m_end);