This is not a question, but a solution to the error:
*** Terminating app due to uncaught exception 'FIRInvalidArgumentException', reason: 'Document path cannot be empty.'
terminating with uncaught exception of type NSException
Some people would get a similar issue because in an older version of Firebase, the check statements for document would only check for a nil string rather than an empty. The latests versions of Firebase check for nil and an empty string.