Using the right function calls to work on FormStateInterface object instead of direct object data access