Switch to using FormStateInterface.