Validate messages' type
'use strict'