Prevent duplicate categories and tasks.