Fix support for 0 as a path params

`first[key] || ''` changes `0` into `''` which is a problem when dealing with simple indexes.