Fix when $this->$type is NULL