Should we be using https://github.com/Islandora/islandora/blob/7.x/includes/utilities.inc#L158 ?