Added class name validation