diff --git a/src/helpers.ts b/src/helpers.ts
index afae164..49ddff3 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -1,3 +1,5 @@
+import { RxQuery } from 'rxdb';
+
 /**
  * Second variable in array is a function that can be invoked to cancel the promise.
  */
@@ -37,3 +39,19 @@ export const getCancelablePromise = <T>(
 		},
 	];
 };
+
+export const isObject = (val: unknown): val is Record<string, unknown> => {
+	return typeof val === 'object' && val !== null;
+};
+
+export const isRxQuery = (val: unknown): val is RxQuery => {
+	return (
+		isObject(val) &&
+		'skip' in val &&
+		'limit' in val &&
+		'$' in val &&
+		isObject(val.$) &&
+		'subscribe' in val.$ &&
+		typeof val.$.subscribe === 'function'
+	);
+};
diff --git a/src/useRxQuery.ts b/src/useRxQuery.ts
index 9361f3a..488f28c 100644
--- a/src/useRxQuery.ts
+++ b/src/useRxQuery.ts
@@ -1,7 +1,8 @@
 import { useEffect, useCallback, useReducer, Reducer } from 'react';
-import { RxQuery, RxDocument, isRxQuery } from 'rxdb';
-import { Override } from './type.helpers';
+import { RxQuery, RxDocument } from 'rxdb';
 import { DeepReadonly } from 'rxdb/dist/types/types';
+import { Override } from './type.helpers';
+import { isRxQuery } from './helpers';
 
 export type ResultMap<T> = Map<string, RxDocument<T, any>>;
 export type AnyQueryResult<T> = DeepReadonly<T>[] | RxDocument<T>[];