Legislation is the will of a group of men and women calling themselves a legislature. It is not law. This is the core difference between what is legal and what is lawful.
As for nullification, if a people has no right to judge not only the facts, but the validity of the purported law that is being applied, then the people are enslaved.
For it to be otherwise, the people would be at the absolute mercy of any legislation created, no matter how insane or criminal. Legislators could pass laws to do anything they want with no recourse for the people.