Improved name validation