Update _.hasPath and _.getPath

Make sure obj is Object(Array)