ivaynberg/select2 — pull request #736 by tamias (2013-01-23 18:58:12+00:00)
Title: Avoid error when label has no matching element

$('#no_such_element').data("select2") returns null rather than
undefined (jQuery 1.9.0).

http://jsfiddle.net/gnv3W/