Remove redundant operations for message type identification during message parsing