checking for panelimage before inserting