[chromedriver] Use instanceof instead of typeof to check if value is an object.

BUG=chromedriver:1276

Review URL: https://codereview.chromium.org/1499013002

Cr-Commit-Position: refs/heads/master@{#363412}
diff --git a/chrome/test/chromedriver/js/call_function.js b/chrome/test/chromedriver/js/call_function.js
index ab1551b..17a0ae5 100644
--- a/chrome/test/chromedriver/js/call_function.js
+++ b/chrome/test/chromedriver/js/call_function.js
@@ -149,7 +149,7 @@
  * @return {*} The wrapped value.
  */
 function wrap(value) {
-  if (typeof(value) == 'object' && value != null) {
+  if (value instanceof Object && value != null) {
     var nodeType = value['nodeType'];
     if (nodeType == NodeType.ELEMENT || nodeType == NodeType.DOCUMENT
         || (SHADOW_DOM_ENABLED && value instanceof ShadowRoot)) {
@@ -176,7 +176,7 @@
  * @return {*} The unwrapped value.
  */
 function unwrap(value, cache) {
-  if (typeof(value) == 'object' && value != null) {
+  if (value instanceof Object && value != null) {
     if (ELEMENT_KEY in value)
       return cache.retrieveItem(value[ELEMENT_KEY]);