[fix] Added correct type checking to the message format