Fix NullPointerException in Document.getRevision()

If you try to get a specific revision using Document.getRevision, but the current revision has never been retrieved (and so `currentRevision` is null), a NullPointerException is thrown.