You choose whether or not to target a creature spell before you decide whether or not to spend {U} on Repel Intruders. You may target a creature spell and then not spend {U} to cast Repel Intruders; if you do, Repel Intruders simply won’t affect that creature spell. Similarly, if you don’t target a creature spell but then you spend {U} to cast Repel Intruders, that part of Repel Intruders has no effect.