ListBox: Be more specific 'limit' values needing a cast.

Original code failed when 'limit' key is set to None.