javascript set value if not defined