Protect against query parse errors