If path_or_url is not a string object, don't try to parse it.