I think age-appropriate is a good idea, but there is no need to keep children 'away' from things related to death. I can't remember when learning about what is death and that kind of thing... although I remember that family friends and relatives died when I was around 3 years old and I was told what is going on...
I did not see a dead body until the age of 10, when my grandmother died and I went to see her body in the coffin. I thought it was not upsetting or scary - really, it was just like seeing a model of my grandmother. It did not seem like 'her' at all. It did not disturb me and I was pleased to have done that final thing (even though it did not feel to me at all like 'saying goodbye'). However, if I have been with someone when they have died, I feel no need to go to see them in their coffin also.
However, when I was very young (under the age of about 6), my parents did not take me to funerals because they thought that the sight of a young child at the funeral might upset some very sensitive people. So there is an issue of considering other people's feelings, too, when bringing child near to 'death'.