title: Argument "data" is not a valid Document. Input is not a plain JavaScript object
body: <p>I am getting below error .</p>
  
  <pre><code>Error: Argument "data" is not a valid Document. Input is not a plain JavaScript object.
      at Object.exports.(anonymous function) [as isDocument] (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/validate.js:86:15)
      at WriteBatch.set (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/write-batch.js:286:14)
      at DocumentReference.set (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/reference.js:420:8)
      at PainEntryService.createEntry (/user_code/services/entry-service.js:19:30)
      at /user_code/services/intentService.js:22:36
      at Function.&lt;anonymous&gt; (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:146:23)
      at next (native)
      at /user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:22:71
      at __awaiter (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:18:12)
      at Function.handler (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:84:16)
  </code></pre>
  
  <p>I am using below code for creating the document </p>
  
  <pre><code>var docRef = this.dbManager.collection('tetst).doc(subjectId);
          var setAlan = docRef.set(EntryEntity.toJSON);
  </code></pre>
  
  <p>I have below code in the toJSON method</p>
  
  <pre><code>public toJSON(): testEntry {
          let returnJSON = {
              "entry_id": this.entry_id,
              "subject_id": this.subject_id,
              "entry_date": this.entry_date,
              "questionnaire": this.questionnaire,
              "entry_start_timestamp": this.entry_start_timestamp,
              "entry_end_timestamp": this.entry_end_timestamp,
              "entry_complete": this.entry_complete,
              //"responses": this.responses,
              "last_answered_question" : this.last_answered_question,
              "entry_status" : this.entry_status
          }
  
          return returnJSON;
      }
  </code></pre>
  
  <p>I am framing json object in the above method. If i print the json object, i am getting below content</p>
  
  <p>{ entry_id: 'df2b4ad4-6a70-4304-a71f-3a63773ada61',
    subject_id: 'ABwppHHkzfY1Whp-lCHNnvEcuqvsbMKtZsg_ui9vc4jtpXSiAbh0fNsg6LxGkYq-Va3SOrwcvD-HAs7VQA',
    entry_date: '2018-06-15',
    questionnaire: 1,
    entry_start_timestamp: '2018-06-15T09:38:10.266Z',
    entry_end_timestamp: '2018-06-15T09:38:10.266Z',
    entry_complete: false,
    last_answered_question: 0,
    entry_status: 'active' }</p>
  
  <p>How to solve above issue? is there any issue with json object?</p>