Prevents the user to add duplicate nodes