This is one of my favorite parables of Jesus (The Sheep and the Goats). It states: "Then the King will answer, "I tell you the truth, anything you did for even the least of my people here, you also did for me."
It's almost a "do unto others" lesson, but when do things to and for others, in this case, be it good or bad, you are also doing it to the Lord. When He knocks, we should always open the door wide.