use String::checkPlain

From the change record 

https://www.drupal.org/node/2302363

check_plain is not longer valid.