Avoid NPE if no image class provided in filter options.

The earlier patch I supplied to test for a null image class was not forwarded to the develop branch, so the problem showed up in 2014.08 branch again.