Add check for empty selections.

The framework now checks that provided selections are not
unconditionally empty, and produces error messages in those cases.
Added an option for controlling this if there is some rare case where
selecting "none" would be reasonable input.

Change-Id: I7066fa89bcebfc883483cf2ddb769a31c3942260