Add preserved character check for input string