Don't assume selection is of an item, sometimes it's null

Since selectItem() is allowed to accept null, assuming the item argument
of a 'select' event handler is an object is clearly dangerous.

Change-Id: If8eedc7d850f4d978b3b894bdf05da8e32969b07