javascript if object is not defined