Better error message on messagetype