Adds check to avoid creating item duplicates.