I know it is correct to say "contro di lui", but "contro il nemico". Why? Is it because in the first case the object is a pronoun and in the second case it is a noun?