@Contract(value = "!null, _ -> !null; null, _ -> param2", pure = true)
  default @Nullable R serializeOr(final @Nullable I component, final @Nullable R fallback) {
    if (component == null) return fallback;

    return this.serialize(component);
  }
Serializes a component into an output of type {@code R}.

<p>If {@code component} is {@code null}, then {@code fallback} will be returned.</p>

@param component the component
@param fallback the fallback value
@return the output if {@code component} is non-null, otherwise {@code fallback}
@since 4.14.0
api/src/main/java/net/kyori/adventure/text/serializer/ComponentEncoder.java