Only in certain states, and I only if you sign such a contract. Did the author actually read his contract and say: "Please remove this part"?
I know California and Washington both have state laws limiting what companies can do in terms of taking ownership of your "outside" work.