CONFIG: Added 'when' clauses to tasks to skip empty collections.