javascript if not null ternary