Added new method for checking strings.