isDuplicate method Null safety

MqttHeader isDuplicate()

Sets the IsDuplicate flag of the header.

Implementation

MqttHeader isDuplicate() {
  duplicate = true;
  return this;
}