javascript if undefined then null