assigns the message typeValue from string or number