@Contract(value = "!null -> !null; null -> null", pure = true)
  default @Nullable R serializeOrNull(final @Nullable I component) {
    return this.serializeOr(component, null);
  }
Serializes a component into an output of type {@code R}.

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

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