Return None for .name of enum if no name for value.

This fixes segfaults when trying to get the name of a dead key
from a qt key event.

Change-Id: Ie631e2245bca0a3fee8616854f6479d3dec0c2bb
Reviewed-by: Roman Lacko <backup.rlacko@gmail.com>
Reviewed-by: John Cummings <jcummings2@users.sf.net>