You must specify x before Nullify is revealed. You specify x, state what your targets are, and pay any costs associated with casting a spell in step 1, cast spell. Nullify would be revealed in step 2, counterspell.
In the case of an enchantment, you only have to pay 2. You didn't resolve the enchantment, so you cannot reveal it anyway.
Nullify only works against incantation and enchantment spells cast on you, not ones that are already in play. There is no counterspell step to revealing an enchantment, and thus, Nullify cannot trigger.