Replace #getOrCreate with separate calls to #get and #create

We need to double check that #createId throws an appropriate exception when an id with that name already exists.