Avoid undefined array index

was hitting this in my inbox.. not sure how i had a thread with no messages.