Added validation for the name field