code: boolean isOptional(Field field) {
          if(field.schema().getType() == Type.UNION) {
              for(Schema nestedType: field.schema().getTypes()) {
                  if(nestedType.getType() == Type.NULL) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: /* package private