Thank you for your answer.
This second sentence in my post is actually from a dictionary - But I'm confused about its use.
This first sentence is from myself, according to my understanding of meaning of "if anything".
My understanding is, something that someone writes after "if anything" is slightly different from what they mentioned earlier. But in this sentence, "Joe isn't a bad boy. If anything he's a pretty good one." The second part of the sentence just confirms the first part, They don't seem to convey different meanings though. The only difference is, if anything, the writer used "pretty good", is it a pun?
I don't know if I've understood all this right, thanks for your help!
Hrm. The second sentence does make sense. "Joe isn't a bad boy. If anything he's a pretty good one." The "if anything" in this context it's used in a way to reaffirm the meaning that he is a good boy. Also the "if anything" is used in an arguing sense.
Perhaps there is a conversation and two people are arguing if Joe is a good or bad boy. Person X thinks he is bad and person Y thinks he is good. Person X says something like "Joe didn't turn his homework in" and person Y replies with "That doesn't make Joe a bad boy, if anything he's a pretty good one". It's to say that just because Joe did not turn his homework in he is still a good boy.