file.accumulate exception fix

Don't iterate NoneType in file.accumulate. Return instead.

Refs #15334
Merge pull request #15605 from cachedout/issue_15334

file.accumulate exception fix