Darn good question. In the case of outsiders, I usually consider them by the alignment in the MM, because they are representations of those alignments (imho). The same applies for undead. For divine casters, since they channel the power of thier faith, they use the alignment of the higher...