Update query.py

Fix bug where if using is passed at the time of initialising the SQS object then it leads to error as self.query is never assigned and remains None