refactored out redundant code.
add the stripping out logic of previous calls to parameters type
added nullable check on GetTypeResponse
moved class reference string filtering to ParameterType