* Turn the argument into either itself or a HTML-safe non-breaking space if it is a string.
* @return HTML-safe non-breaking space of the argument itself
*/
public static Object orNbsp(Object x) {
if (x == null) {
return new Html(" ");
}
if (x instanceof String) {
final String s = x.toString();
if (s.isEmpty()) {
return new Html(" ");
}
}
return x;
}