Add rudimentary type-checking for paths.