new add isMsgType function