Extracted methos getTypeByName()