@cvrebert moved the type conversion here so it's not done below in the isabs and isdir checks.