fix #3250 - check if getRawQuery is null