Function checks if string in array.