get 'to' value if the 13th index is undefined

This worked for me, though the format is little different, if you are only looking for email address then you will get it.