Meanwhile if you run into this, try to figure out if you have some unusual font installed on your mac that doesn’t belong to a font family. In code, this seems to be caused by some font reporting its font family value to be NULL.
Credits to @n0c for the help debugging this issue!
I can confirm that deleting the offending font files fixes the issue! It took me some time to find them, though.
In my case, these font files were installed to the ~/Library/Fonts folder, but they did not appear in the Font Book app. I think that I previously generated those fonts from WOFF files, and the 'name' table did not transfer over.