bug
Uncaught TypeError: Cannot read property 'name' of undefined
Uncaught TypeError: e.hasOwnProperty is not a function

infinite loading in component view
![image](https://user-images.githubusercontent.com/8398353/71717720-a37e8e00-2e21-11ea-82a3-cc6d815158fc.png)

Reproduce:
use hook useRouter or HOC withRouter from react-router-dom and select component with hook/hoc in components view react developer tools
Issue is caused by not-bug https://github.com/hapijs/hapi/issues/3280
(query object does not have constructor and does not have hasOwnProperty)

![image](https://user-images.githubusercontent.com/8398353/71717283-4afac100-2e20-11ea-9f86-84f63cb73ab1.png)
![image](https://user-images.githubusercontent.com/8398353/71717412-b6dd2980-2e20-11ea-8514-04708cf02015.png)
![image](https://user-images.githubusercontent.com/8398353/71717397-a75de080-2e20-11ea-9dc3-35da5a4f0ff4.png)

Portal,
  Profiler,
  StrictMode,
  Suspense,
} from 'react-is';
import {
  TREE_OPERATION_ADD,
  TREE_OPERATION_REMOVE,
  TREE_OPERATION_REORDER_CHILDREN,
  TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
} from '.constants';
import {ElementTypeRoot} from 'react-devtools-sharedsrctypes';
import {
  LOCAL_STORAGE_FILTER_PREFERENCES_KEY,
  LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY,
} from '.constants';
import {ComponentFilterElementType, ElementTypeHostComponent} from '.types';
import {
  ElementTypeClass,
  ElementTypeForwardRef,
  ElementTypeFunction,
  ElementTypeMemo,
} from 'react-devtools-sharedsrctypes';
import {localStorageGetItem, localStorageSetItem} from '.storage';
import {alphaSortEntries} from '.devtoolsviewsutils';
import {meta} from '.hydration';
import type {ComponentFilter, ElementType} from '.types';
const cachedDisplayNames: WeakMap<Function, string> = new WeakMap();
let encodedStringCache = new LRU({max: 1000});
export function getDisplayName(