title: Check if an argument is a path
body: <p>I'm writing a script in bash. It will receive from 2 to 5 arguments. For example:</p>
  
  <p><code>./foo.sh -n -v SomeString Type Directory</code></p>
  
  <p>-n, -v and Directory are optional.
  If script doesn't receive argument Directory it will search in current directory for a string.
  Otherwise it will follow received path and search there. If this directory doesn't exist it will send a message.</p>
  
  <p>The question is: Is there a way to check if the last arg is a path or not?</p>