public function get_rule_object() {
        $rule = $this->get('ruletype');

        if (!$rule || !is_subclass_of($rule, 'core_competency\\competency_rule')) {
            // Double check that the rule is extending the right class to avoid bad surprises.
            return null;
        }

        return new $rule($this);
    }