This is another one straight from the mediacore Java:

    if (!queryString.equals("")
    &&  !queryString.equals("*")) {
      newQs = queryString + "&" + newQs;
    }