Merge pull request #15 from nobu-k/slice-type-check

Fix decodeSlice to check input type before calling its Len method