prevent null docs and statements if not found