When to change derailleur pulleys? A friend said me that if you have one part in a very bad condition like a cassette and then you put a new stuff like a new chain it will destroy the new stuff very quickly. A LBS said that I should change my derailleur's pulley wheels after I said that the derailleur has undergone at least 10Mm. Then again, another LBS said that I should change only the cassette and the old derailleur pulleys do not matter. Hence, I am very confused. Are there any objective ways to state when one should change derailleur pulleys?

The diameters of the pulleys in the picture are about 3.6cm above and about 4.0cm below. They seem like the products here. Cannot find the specs of the original ones to compare, yet.
Worn derailleur pulleys (also known as "jockey wheels") will not cause excessive wear on a chain because they aren't made of metal.

Eventually, though, the bushings inside will become worn and the outer teeth will wear down.  Park illustrates the latter progression in their article on rear derailleur overhaul.

As with many things in bicycle maintenance the only objective metric for replacing something is that it no longer works satisfactorily.  Their failure mode might best be described as gradual rather than catastrophic.  If the pulley bushing doesn't have much slop in it and the teeth are still capable of guiding the chain effectively it's almost certainly fine. If the rest of the drivetrain is in new condition and there are still issues with shifting it's probably worth giving them a look.

As far as the practical matter of replacing them goes, in my experience for the most part you need to find the manufacturer specification to track down compatible replacements.