Should change to either `if self.proxy is not None` or `self.has_proxy`.