I prefer - "I am sorry for your loss," if I don't really know the person. If I do, it is usually something more along the lines of, "I believe your loved one is as they were before they were born and am thankful they are no longer in pain."
Because honestly, if the choice is heaven or hell...