DocumentsUI: Handle NPE gracefully

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-956

Change-Id: I8d50d71a9c91486dfc9e5da01538c6b5a626f054
Fix DocumentsUI FC

Change-Id: I2bfd4ea83db53ee83683a4754b49b15cc2abeaca