optimize PlainFormatter
there is no need to call Optional.ofNullable(null) each time.
additionally, use of  Optional.empty() is more efficient.