server: only send messages if type is valid