Check argument, not arg

If argument is a Pathname, arg is Pathname#to_s