title: MongoDB throwing BsonInvalidOperationException when accessing GridFS
body: <p>This code:</p>
  
  <pre><code>ServerAddress serverAddress = new ServerAddress(url, Integer.valueOf(port));
  MongoCredential credential = MongoCredential.createScramSha1Credential(username,"admin",
   password.toCharArray());
  MongoClient mongoClient = new MongoClient(serverAddress, Arrays.asList(credential));
  MongoDatabase mongoDatabase = mongoClient.getDatabase("admin");
  GridFSBucket gridFSBucket = GridFSBuckets.create(mongoDatabase);
  gridFSBucket.find().forEach(
   new Block &lt; GridFSFile &gt; () {
    @Override
    public void apply(final GridFSFile gridFSFile) {
     System.out.println(gridFSFile.getFilename());
    }
   });
  </code></pre>
  
  <p>Throws this error:</p>
  
  <pre><code>org.bson.BsonInvalidOperationException: Value expected to be of type DOCUMENT is of unexpected type NULL
      at org.bson.BsonValue.throwIfInvalidType(BsonValue.java:419)
      at org.bson.BsonValue.asDocument(BsonValue.java:47)
      at org.bson.BsonDocument.getDocument(BsonDocument.java:506)
  </code></pre>
  
  <p>I'm been puzzled with this, since using a MongoDB client (like Robomongo) I can see the <em>fs.files</em></p>