added extra check to make sure that each programme in the import is an object