Checking the data is necessary to avoid undefined behaviour or even letting your application crash. I guess that you are using UDP because you are broadcasting. Then data may be inconsistent (rare but may happen).
I suggest to not use strings but raw data instead. That avoids conversions to and from string (speed) and makes the packets usually smaller. You can also provide a checksum to drop invalid packets.
Such a packet might for example look like
typedef struct {
uint32_t type; uint32_t length; uint32_t checksum; uint32_t version; uint32_t id;
uint32_t loc_x;
uint32_t loc_y;
uint32_t loc_z;
uint32_t name_len;
uint8_t name[1]; } net_packet_t;
If you have to pass multiple strings (or any other data with variable length), add for each an offset value beside the length value. Then you can use that to locate the next field.