guard against names that are None
Merge pull request #4456 from dimagi/casenmae

guard against names that are None