how to compare strings in javascript if condition