User validation prior to doing import/export, removing duplicate code