Fix failing test

Ensure we send in correct type of data in specs.
And handle undefined values in paths.