Avoid NPE (testing with Firebug 1.12)

I have been testing PixelPerfect with Firebug 1.12 and found two small problems (exceptions).
Fixed in this patch.

Honza