Check whether a category name is available. API dry-run / custom slug?

Possibly stupid question, because I didn’t check, but…
If you don’t specify a slug, doesn’t Discourse automatically select a free one?