Making a conditional check for type parser

The code is failing with pg-copy-streams.  The pg-copy-streams creates a query object but it doesn't have any _result.  Make the type parser an optional only when _result object available on query then only set the type parser.