Consider the custom toString() implementation of a bean:
toString()
@Override public String toString() { String.format(\"this is %s\", this.someField); } <
If you don't want to use replaceAll(), You can assign a default text(String) for someField.
replaceAll()
someField
But if some time this may assign null again. So you can use validation for that case
null
this.someField == null ? "defaultText" : this.someField