It is absolutely true that there are certain types of people who are toxic to your quality of life.
They may have abusive tendencies, dark cynical outlooks or they could be self-destructive.
Our minds are always trying to judge, and our hearts discern whether or not certain people are good for us.
The residual trauma of being abused or mistreated by another creates the need to strictly enforce the condemning of unhealthy people in our lives. The extreme of this will cause imbalance and the accumulation of residual karma.
The act of condemning a person even for a good reason, is a fear based egoic mechanism that reinforces fear and anger. A person will feel constantly on edge or anxious during that time of judgment.