title: Firestore web code sample gives invalid argument type
body: <p>I am trying out the new Firestore by Firebase. When I run the code sample from <a href="https://firebase.google.com/docs/firestore/manage-data/add-data?authuser=0" rel="nofollow noreferrer">https://firebase.google.com/docs/firestore/manage-data/add-data?authuser=0</a>, I am getting an error.</p>
  
  <pre><code>// Add a new document with a generated id.
  db.collection("cities").add({
      name: "Tokyo",
      country: "Japan"
  })
  .then(function(docRef) {
      console.log("Document written with ID: ", docRef.id);
  })
  .catch(function(error) {
      console.error("Error adding document: ", error);
  });
  </code></pre>
  
  <blockquote>
    <p>Exception caught: (FirebaseError) : Function CollectionReference.add() requires its first argument to be of type object, but it was: a custom Object object</p>
  </blockquote>
  
  <p>Edit:
  Sorry I didnt mention I am using GWT and JSNI, it's working fine without gwt</p>