Handle empty arrays and errors for migrations, moved getDefaultSettings