It is narrated from Hazrat Mu'adh (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) promised us regarding five things: whoever does these deeds will be under Allah's protection—one who visits the sick, one who participates in a funeral, one who goes out for jihad in the way of Allah, one who goes to the imam to honor and respect him, or a person who stays in his house so that people remain safe from his harm and he remains safe from the harm of people.
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 22093