refactor FirmTypeUtil