Unfortunately on macOS, to check for whether a path is a package or bundle, the MDItem* functions necessitate the use of CFStrings, and all of the joys that come with them. As I have had to implement these myself, they are probably not very robust.
In the interest of everyone who doesn't use the Latin alphabet, I should ensure the string interface with Apple's Core Foundation works robustly.