illegality vs invalidity

illegality

noun
  • the state of being illegal 

  • a defense to the validity of a contract because it was in violation of the law 

invalidity

noun
  • The state of being invalid; lack of validity. 

How often have the words illegality and invalidity occurred in a corpus of books? (source: Google Ngram Viewer )