stop tryGetDoc returning Some(null) causing an exception