Fix a bug where attempting to create a document with ID the empty string could result in the creation of a new database, or an unhelpful error message.