The workaround method I'd seen for it had involved checking if they could cast a spell of each school, and working back from there to figure out which school they specialized in. Might have been one of ShadoOw's codes, I can't remember who posted it.
Nwnx allows for checking it directly, if you decide to go that route. In windows:
// Sets the specialist spell school of a Wizard
void NWNXFuncs_SetWizardSpecialization(object oCreature, int iSpecialization);
// Returns the specialist spell school of a Wizard
int NWNXFuncs_GetWizardSpecialization(object oCreature);