When registering as a new user, the name you choose is checked as soon as you leave the name-textfield. If you choose a name that's actively in use, you get the warning:
"Username entered already in use. Please choose a different name."
This should also catch registered usernames that are inactive (have no edits?). Currently those aren't caught until the form is submitted.
In those cases, you get a different error after submission:
"[...] the requested username is already taken in the unified login system"
(This is on most WM wikis. Some have checks for name-similarity which evaluate first.)