Added validation for avatar upload