added check for docinfo is none