title: Why is Mongoose returning "null" continuing to return null regardless of what I do?
body: <p>I am able to connect to my MongoDB database and am sure that I am connecting to the correct one. When I try to get a document from the database I always get &quot;null&quot;. I am sure that there are documents in the collection as I can see them in Compass.</p>
  <pre><code>const theschema = new Schema({
      sensor: {
          type: String,
          required: true
      }
  })
  
  const model = mongoose.model('Sensor', theschema)
  
  
  model.findOne({}, function(err, data) {
      console.log(data)
  })
  </code></pre>
  <p>Above is the code I am currently using for this. I'd appreciate any help possible. Thanks! :)</p>