If a person sees himself as asking a dead person about anything regarding the dead persons’ or another’s condition then the answer of the dead person will be true to its word- whether good or bad- for the dead person dwells in the world of truthfulness (ie. Aakhirah) as opposed to the world of falsehood (ie dunya). Thus, he does not speak a lie in whatever report he gives.
Islamic Dream Interpretation
by Ibn-i Sirin
What Does Speaking To The Dead Mean In Dream?