Consider the custom toString() implementation of a bean:
toString()
@Override public String toString() { String.format(\"this is %s\", this.someField); } <
From java 7, you can use Objects.toString(Object o, String nullDefault).
Objects.toString(Object o, String nullDefault)
Applied to your example: String.format("this is %s", Objects.toString(this.someField, "?"));
String.format("this is %s", Objects.toString(this.someField, "?"));