code: public static SoyValueProvider getFieldProvider(
        SoyRecord record, String field, @Nullable SoyValue defaultValue) {
      checkNotNull(record, "Attempted to access field '%s' of null", field);
      // TODO(lukes): ideally this would be the behavior of getFieldProvider, but Tofu relies on it
      // returning null to interpret it as 'undefined'. http://b/20537225 describes the issues in Tofu
      SoyValueProvider provider = record.getFieldProvider(field);
      if (provider == null) {
        if (defaultValue == null) {
          return NULL_PROVIDER;
        }
        return defaultValue;
      } else if (provider instanceof NullData) {
        return NULL_PROVIDER;
      }
      return provider;
    }
docs: Helper function to make SoyRecord.getFieldProvider a non-nullable function by returning {@link
  #NULL_PROVIDER} for missing fields.