added method to check if string is an int