what would be a quick way to programmatically check if a query is valid or not without actually fetching results? I tried putting malformed queries into Semantic Search, but I get all results (which probably eats up a lot of CPU cycles) before I see a small error message.