javascript if not null return value