fixed bug detecting stringifiable documents