fix to check string type(string/wstring)