Safer parsing of model name