Fix decodeSlice to check input type before calling its Len method

In ``decodeSlice``, the type of ``data`` isn't checked before calling ``dataVal.Len()``, and ``reflect.Value.Len`` panics when the value doesn't have a length. So, ``decodeSlice`` panics if I pass integer values or something like that to it. I added a test code as an example case.