Add isset check to documents