Creating an error message if two entries are the same