javascript if condition for string