Fix NPE when submitting error occurred during import.

Regression. Should be tested and included before release See https://trac.openmicroscopy.org.uk/ome/ticket/10160