code: public static String concatWithSpaces(final Object... osToString) {
          final StringBuilder b = new StringBuilder();
          boolean notFirst = false;
          if (osToString != null) {
              for (final Object o : osToString) {
                  if (notFirst) {
                      b.append(" ");
                  } else {
                      notFirst = true;
                  }
                  b.append(o != null ? o.toString() : "null");
              }
          }
          return b.toString();
      }
docs: Concatenate the string value of the objects (toString()) and
  insert a space between each value. If osString is null, return empty ""
  but if one of the value is null, then use 'null' string.