Лишних символов нет, значения null отсекаются:
public static void main(String[] args) {

    Map<String, String> testMap = new LinkedHashMap<>();
    testMap.put("name", "Ivanov");
    testMap.put("country", "Ukraine");
    testMap.put("city", "Kiev");
    testMap.put("age", null);

    System.out.println(getQuery(testMap));
}
Вывод: name = 'Ivanov' and country = 'Ukraine' and city = 'Kiev'