javascript check if var is not null or undefined