i never do either, i typically just say "if you want to talk, you know i'll listen" because there's really nothing you can say that'll make them feel better
Just listen.
I said "I'm sorry to hear about your dad's death. It must be really hard for you. I have a hug for you when you get back here."