Refactoring open generic detection/manipulation into separate type.