Move module configuration check into own function.