Checks if a string is a plaindrome