Added a validation in the seed method to check if the id exists