code: protected void checkPreconditions(final String methodName, final BsonType type) {
          if (isClosed()) {
              throw new IllegalStateException("BsonWriter is closed");
          }
  
          verifyBSONType(methodName, type);
      }
docs: Ensures any conditions are met before reading commences.  Throws exceptions if the conditions are not met.
  
  @param methodName the name of the current method, which will indicate the field being read
  @param type       the type of this field