Don't compare images when image is None
Don't compare images when image is None

Image cache can set images to None under certain workflow,
and then we are accessing this None entry as it was
an object. Add an extra check for that.

Change-Id: Ia9b737c81ed8133ff5a6ba26f98b7f55fca095de

jsmartin/shade,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,openstack-infra/shade,jsmartin/shade,openstack/python-openstacksdk,openstack-infra/shade,openstack/python-openstacksdk,stackforge/python-openstacksdk