Add check for resource passed to copyBodyStream() method in Response