Check if gem name has valid format