javascript substring in string check