Author's grandmother, Marjorie Straus, with his mother, Margot Petrow, left, and his aunt Ann Youngwood.

Last summer, six months before my mother died, I walked into her bedroom, and she greeted me with tinny hello and a big smile. She then resumed a conversation with her mother - who had died in 1973."Where are you?" Mom asked, as though Grandma, a onetime Fifth Avenue milliner, was on one of her many European hat-buying junkets. As I stood there dumbstruck, Mom continued chatting - in a young girl's voice, no less - for several more minutes. Was this a reaction to medication, a sign of advancing dementia? Or was she preparing to "transition" to wherever she was going next?Regardless, Mom was freaking me out - as well as my brother, sister and father.As it turned out, my mother's chat with a ghost was a signal that the end was inching closer. Those who work with the terminally ill, such as social workers and hospice caregivers, call these episodes or visions a manifestation of what is called Nearing Death Awareness."They are very common among dying patients in hospice situations," Rebecca Valla, a psychiatrist in Winston-Salem, N.C., who specializes in treating terminally ill patients, wrote in an email. "Those who are dying and seem to be in and out of this world and the 'next' one often find their deceased loved ones present, and they communicate with them. In many cases, the predeceased loved ones seem (to the dying person) to be aiding them in their 'transition' to the next world."While family members are often clueless about this phenomenon, at least at the outset, a small 2014 study of hospice patients concluded that "most participants" reported such visions and that as these people "approached death, comforting dreams/visions of the deceased became more prevalent."Jim May, a licensed clinical social worker in Durham, North Carolina, said that family members - and patients themselves - are frequently surprised by these deathbed visitors, often asking him to help them understand what is happening. "I really try to encourage people, whether it's a near-death experience or a hallucination, to just go with the flow," May explained after I told him about my mom's visitations. "Whatever they are experiencing is real to them."Valla agreed, telling me what not to do: "Minimize, dismiss or, worse, pathologize these accounts, which is harmful and can be traumatic" to the dying person. In fact, May said, "most patients find the conversations to be comforting."That certainly appeared to be the case with my mother, who had happy exchanges with several good friends, who, like my grandmother, were no longer living.In a moving 2015 TED talk, Christopher Kerr, the chief medical officer at the Center for Hospice and Palliative Care in Buffalo, showed a clip of one his terminally ill patients discussing her deathbed visions, which included her saying, "My mom and dad, my uncle, everybody I knew that was dead was there (by my side). I remember seeing every piece of their face." She was lucid and present.Since Mom had already been diagnosed with advanced dementia, I originally thought her talks were a sign of worsening illness. In fact, current research posits that a combination of physiological, pharmacological and psychological explanations may be at play. That's exactly what May's hands-on experience of more than 14 years revealed to him, too.May acknowledged that it's understandably "hard to have empirical evidence" for such episodes in patients, but that it's important for family members and health professionals to figure out how to respondLast fall, another visit to Mom raised the stakes. As before, she greeted me by name and spoke coherently for several minutes before she turned to the bookcase near her bed and began cooing to an imagined baby. I watched in astonishment as Mom gitchi-gitchi-goo-ed to an apparition she referred to as "her" baby."My baby is very sick," she repeated, clearly deeply concerned about this apparition. "She's very thirsty. She's hungry. She's crying. Can't you do anything for her?"I didn't know what to do. Neither did my siblings or Dad. I had long stopped "correcting" Mom. A year earlier, Mom had regaled me with the story that my niece Anna had made a delicious dinner the night before and was at that very moment out doing errands. In fact, Anna was away at college; also, I've never seen her cook, and she doesn't even have a driver's license. But why contradict Mom's vision of a perfect granddaughter?Social worker May, when asked about these sorts of imaginings, put it this way: "Don't argue, because an argument is not what they need." I decided to go along with the "baby" story and told Mom I was going to take the baby to the kitchen to bottle-feed her, which alleviated the crisis.As the fall days grew shorter, Mom's "baby" was a continuing presence at my visits, with my mother becoming increasingly distressed. I would settle things down by giving the imagined infant an imaginary bottle, or cradle her in my arms and leave the room for a while, saying I was taking her to the doctor. At one point I asked gently, "Mom, do you think the baby is you?" She didn't miss a beat. "Yes," she replied. "The baby is hurting."In fact, the largest study to date on deathbed visions reported on numerous cases when the "arrival of ... a visitor appeared to arouse anxiety and intensify death fear."But what to do? I hated that Mom's level of distress was skyrocketing in what turned out to be her final weeks. I simply held Mom's hands a bit tighter and tried to distract her as best I could with family and political news. Oh, and I cooked, which she loved my doing.One evening I made a simple dinner: spaghetti with a store-bought marinara sauce and a bright green leafy salad. Mom had pretty much stopped eating by this point, which is common as the end draws near, but she made a show of trying her best with this repast for the two of us, plus my father. It was heartbreaking to watch her try to spear the pasta, but she managed several hearty mouthfuls, saving room for a scoop of Sealtest vanilla ice cream.After dinner, I helped her back to bed, where she exclaimed: "How did you know?" "How did I know what?" I asked. "That was exactly how I wanted my funeral to be. You invited all my favorite people, and the food was just what I would have ordered."

She was beaming. Six weeks later, she passed - and pasta and salad were on the menu at her service.