[mms_dispatcher] Beware of tasks with NULL ids

This should fix the recently observed crash in mms_dispatcher_cancel().