Added some checking to see if users were created before doing anything with them.
Before it crashed with an index error.
Now it crashes with an Assertion error with a description of what went wrong.