Can you pass non-string objects from getStaticPaths() in Next.js?

As its documents

params contains the route parameters for pages using dynamic routes. For example, if the page name is [id].js , then params will look like { id: ... }.

So the answer is no, you can only access slug from your params. Btw, why don't you make a call to http://127.0.0.1:8000/dictionary/expressions and did a comparison with your slug? Cause those ones is executed in build time, it won't affect to your website loading speed.