fix(entity-class): fix entities faulty preferred images

Closes #124

Some entities have a preferred image value set that is pointing to an
expression that no longer exists. It now checks if the expression
exists, before trying to access it.