if “is valid” returns false, it means that the object does not exist. you can’t do anything with that object therefore. try this.