Solve a possible NPE in the Documents provider