Tweak query. Guard for nil.