checks for duplicates in trip table