javascript check if not null and not undefined