javascript check if string contains characters