safely constantize task type