code: private static String[] fmtObjectToStrArray(Object object) {
          if (object == null) {
              return null;
          }
          if (object instanceof String[]) {
              return (String[]) object;
          }
          if (object instanceof Collection) {
              Collection c = (Collection) object;
              return (String[]) c.toArray(new String[c.size()]);
          }
          return null;
      }
docs: cast or convert the given object to string array.
  
  @param object a string array or string collection.
  @return string array