NULL checks on selected item in key handling routines.