Error thrown

Call to a member function set_common_unit() on null