Fix build: add null checks to filtered query before checking IsConditionless