ensuring compatible types for possible Pathnames.