One of the classical problems of philosophy is how we can be certain about things. Could it not be that I am right now dreaming, that the things I see around me do not really exists, that my memories have just been fabricated by someone who wants to delude me?
When dealing with problems with this one, the first thing I do is do generalise to arbitrary human-like beings: How can a human-like being at any one point know that he/she is not dreaming, etc. ? Generalising in this way is not necessary, but I believe it is a good practise; it may help us avoid obsession with ourselves.
I never said that the human-like being had to be real rather than fictive, so take your favorite fictive character and imagine him/her asking whether some object he/she is interacting with really exists. Assuming that fictive beings do not exist, the answer may be that the object in question does not exist. But of course, all this means is that the question should be reformulated: How can a human-like being know that some object it is interacting with is not just an illusion?
Let us now admit something that should be trivial and uncontroversial: Human-like beings can be dreaming, they can discover they thought they were interacting with some object when actually they were not, and they can misremember things. So let us rephrase the question: How is it that under ideal circumstances a human-like being is able to be absolutely certain it is not dreaming or being deluded in some other way?
I have come to believe that one should approach this question as a security problem. Just as we can guard ourselves against all sorts of crimes, so we can guard ourselves against individual or collective delusions. Or, to put it in general terms, someone/something that has/may have knowledge can take security measures to defend itself against delusions.
We are living in a world full of risks that we can never quite eliminate, so let us approach the problem of absolute certainty with some humility. To obtain a truly well-founded security we ought to think the way security experts do, but instead we tend to incorrectly feel secure in situations where a security expert would see risks, and at the same time we tend to worry about things a security expert would not worry about.
That said, just as we can often be reasonably confident that an object we have stored somewhere is not going to be robbed within the next hour, so we can often be reasonably confident that we are not going to fall prey to some big delusion within the next hour.
By the way, security thinking and knowledge are things that apply to organisations: As an organisation interacts with its environment it should be guarded against all sorts of threats, including things that can make it think it knows things which in reality it does not know.