`generateFileID` builds a hash on some document properties, some of them might be undefined or null such that `toString()` will fail. Replaced `toString()` with `String(value)`