eagerly raise on empty case_id

fixes http://manage.dimagi.com/default.asp?100211