Aye, that seems like a lot of logic.
There is an overridable method "IsValid()" that you should implement, i believe this is run once the properties are available and you should be able to put the logic in there and return false if it isn't valid, i think you can set the error somewhere too....
Not 100% if this is run on WebPart Configuration (so if they try to save the configuration it checks this), or if it's run on web part rendering (in which case they can save a wrongly configured webpart but it won't display). That you'll need to check!
public override bool IsValid()