[Alias] Add some checks.

Make sure the new alias is valid and won't clash with any commands.