You can do it, if you attempt to be nice about it. But then again it really depends on the context. You either come out as a nice person trying to help people improve or a snob who cares too muc for trivial things, or even a mean person trying to degrade other. I notice that people often use grammar correction as a way to insult, especially when they can’t win an argument. It’s just a way of saying “How the hell do you think you are that great if you are so stupid you can’t even write a grammatically correct sentence?” It’s a fallacy, but it happens often.