title: How to check if an object is a ROS message
body: <p>In ROS1, it was possible to check if an object was a ROS Message by using <code>genpy</code>:</p>
  <pre class="lang-py prettyprint-override"><code>isinstance(obj, genpy.message.Message)
  </code></pre>
  <p>However, I cannot seem to find the same functionality in ROS2. If we look at the <code>__mro__</code> of the classes there does not seem to be anything to work with:</p>
  <p>In ROS1:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; from rospy_tutorials.srv import AddTwoIntsRequest
  &gt;&gt;&gt; AddTwoIntsRequest.__mro__
  (&lt;class 'rospy_tutorials.srv._AddTwoInts.AddTwoIntsRequest'&gt;, &lt;class 'genpy.message.Message'&gt;, &lt;class 'object'&gt;)
  </code></pre>
  <p>In ROS2:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; from example_interfaces.srv import AddTwoInts
  &gt;&gt;&gt; AddTwoInts.Request.__mro__
  (&lt;class 'example_interfaces.srv._add_two_ints.AddTwoInts_Request'&gt;, &lt;class 'object'&gt;)
  </code></pre>
  <p>Have I missed something?</p>