modules/chanserv/topic: better parameter checks to avoid crash