check what type of path a string is