Fixed isHintCharsetValid

Small fix in isHintCharsetValid (#989)