Is there an association between cancer and dementia in cohorts with and without T2DM? A national observational study