Added registry for validating uniqueness of name.

@destijl for review.
I've added an assert to see if artifact_definition is not None instead.