I think it depends, comes down to the individual rapper and their choices in how they use the genre. A lot of rappers such as J. Cole and Kendrick, like you mention, use the genre to artistically express the harshness of reality and try to make a positive impact. Then you also have rappers who really just want to make money by cashing in on stereotypes.
In a perfect world, artists have a certain level of responsibility for their message - positive or negative, nothing occurs in a vacuum. On the other hand, an artist can't exactly control what the reaction of a person listening to their message will be. Its shades of gray.