Added validations to the Book class