Decode task type before checking validity