Give better error on blank entity id

Previously was a pretty useless error in the logs: http://logs.internal.dimagi.com:9000/commcare-hq-dev-team/hq-production/group/78612