This will result in empty strings in your list of peers below. How about you return an error that can be logged and prevent invalid entries in the peers list?