Hi,
Although everyone gives the correct answer. i would like to add more.
Error it self says what is the problem. The line where you are having issue is using filterQuery variable. Either you can assign default value of the string at the time of declaration or you need to add some conditions at the time of concatenation. but the best option is to assign default value or you can say blank in case of string.
Whenever you are creating some variable don't forget to assign some value to prevent such kind of errors. Sometimes you may not able to test all the possible scenarios. so best way to solve such error is,
String str = default(String);
Customer cust = default(Customer);
Hope this will help you.
Best luck
-Amit