code: public boolean hasData(Class<?> dataClass) {
      if (dataClass == null) {
        return false;
      }
  
      return dataClass.isPrimitive() ? hasData() : dataClass.isInstance(data);
    }
docs: Boolean method telling message contains data of given type or not.
  
  @param dataClass data class
  @return true if message has not null data of given type