prevent KeyError for unknown case types

http://manage.dimagi.com/default.asp?92552#527924