Thanks for hitting the nail on the head, icebear.
I'm not about to say that if the target is invalid, the spell goes off, but the duration stays the same - thus having wackiness like Hypersmurf's Monk who suddenly becomes dominated.
However, just like Icebear was saying, if "Dominate Person" involved a red ray of crackling energy going from your mind to the mind of the person it was being cast on, even if the target was invalid, you'd still have the ray itself.
If you tried to cast Dominate Person on a major image, the spell goes off, you'd have the ray of red energy, and the wizard controlling the major image could even make the image react as if it had resisted (or failed) the saving throw.... however in this case, the wizard is instantly going to know that something is wrong, since he can't feel a mental presence of any kind.
Similarly, if you cast Magic Missle at a rock, a ray of energy flies at the rock, but it doesn't have any other kind of effect.
I think you're confusing effecting the TARGET and having the spell have an EFFECT at all.
Obviously, if the target of the spell is invalid, the spell will have no effect on the target. A magic missle won't damage a rock, and dominate person won't control a Major Image.
However, that doesn't mean that spells don't have more general "effects" that aren't dependent on the target (like magic missle)
Heck, I assume simple things like little puffs of smoke enveloping spell components, glowing hands when casting cure spells, minor light and sound effects while casting spells. Are you saying none of this stuff ever happens? Sure, it's not in the RULES, fine... but I mean really?