Detecting if a Mac is using Apple Silicon

As far as I can tell, here’s the official apple approved way to detect Rosetta emulation: