Verifying if there is an object with same id