Split function causes Type error

Hi all,
in my flow I receive messages via TCP. The payload is for example 1:::Hello World
Now I want to split the payload into an array where array[0] = 1 and array[1] = Hello World.

I do so by using a function. The input of the function node is connected to the output of the tcp_in.

The function code is:

var IDs = msg.payload.split(":::")

But if I run this I get a "TypeError: msg.payload.split is not a function"

I also tried this:
var smsg = msg.payload
var IDs = smsg.split(":::")

but with the same result

Does anyone have an idea?
Thanks in advance

What type is the input? It may well be a buffer not a string.

you made my day. That was the problem. Thanks a lot