Handle missing documents more gracefully