Bug 842702: Don't attempt to use undefined or null as valid images for context-menu items.

Using just String as the option map meant that undefined became "undefined" and so the rest of the code saw it as an image and applied the menu styles as if something would display. This fixes that, also in a couple of other cases.