getSingleton - assert a list has exactly one element and get it