Avoid a crash when tasks are just functions (wrapped into execute_or_not()).