Implemented validation for the Pet object