Where is this code from? I don't think HandmadeHero uses CoCreateInstance function.
Casey used similar style code for XInput functions. When he writes code that loads functions dynamically from DLL, he does not want usage code to be littered with "if" statements (if funciton pointer is NULL do not call it, otherwise call it).
Instead he creates stub functions that does not do anything - simply returns dummy value. And if loading dll file failed, there is no actual function pointer to assign, so the usage code does not need to care about this - as stub function will be called.
This is explained here:
https://hero.handmade.network/episode/code/day006/#1725
This makes sense for XInput functions, because dll potentially can be missing if you are running on older Windows.
For CoCreateInstance function this kind of code does not make much sense, as it this function will always be present in ole32.dll file. Not sure why somebody wrote it like that...