Added getMessageType() method