replaced if-else with pattern match
remove redundant case & ICustomTypeProvider