fix succ/pred for a empty string

- closes #363
Merge pull request #364 from epeli/adjacent-check-length

fix succ/pred for an empty string