code: public static <T> void writeNullable(
        @Nullable T value, @NonNull Parcel dest, int flags, @NonNull TypeAdapter<T> adapter) {
      if (value == null) {
        dest.writeInt(0);
      } else {
        dest.writeInt(1);
        adapter.writeToParcel(value, dest, flags);
      }
    }
docs: Writes a {@code T} instance to {@code dest} using {@code adapter}. This method can handle
  {@code null} values. When reading this type out of the parcel later, you should use
  {@link #readNullable(Parcel, TypeAdapter)}.