Sure, but unwarranted fear of dead bodies isn't good either. Not even many infectious diseases remain infectious, since dead people can't cough or sneeze. And there's no such thing as miasma either.
Here's a good explanation from a mortician: https://www.youtube.com/watch?v=yw7bsNKsABQ