Typo in ticket number fixed.
Checking whether object exists before calling method on it.
Added a TC: removing img at IE might cause an exception.