and he can’t distinguish between good and evil
Possible, but he doesn't come across as having dementia in his conversation with David in II Sam. 19.