Explode string into ay

If the expected parameter is an array of bytes, and a string is
recieved, then explode the string into an array of bytes.
More saying error in case an array was expected