how to get data in views templates
It shows you the Notice because somewhere in your data array you have missing data for a specific node. As for being correct, yes, it is a good way to alter the output. Try checking the data before printing it.

Something like

if(isset($row-&gt;field_field_twitter_screen_name[0]['rendered']['#markup'])) {
  //do custom action here
}


Edit: You can also make good use of $content variable here.