Document checking helper