Convert int to string for using indexOf

Using indexOf on int throwing error