Is being-nice a good thing?

I think it is good but sometimes it hurts if other person takes advantage of it. Something happened, that upsets me..
So is being-nice a good thing?

No matter what happens, I would always try to be a nice person.