Tests if an inputted string is a palindome