Updated message-classes to have safer type checking