check if something is not null javascript