cppcheck is right that the check for preventing null deference of Query