Check for both str and unicode as file path inputs