doc.data(...).lastModified.toDate is not a function