public Query appendIf(final String name,final Boolean value) throws UnsupportedEncodingException {
  if (value != null) {
    append(name,value.toString());
  }
  return this;
}

public Query appendIf ( final String name , final Boolean value ) throws UnsupportedEncodingException { if ( value != null ) { append ( name , value . toString ( ) ) ; } return this ; }
conditionally append a parameter to the query if the value of the parameter is not null
