Error thrown

Call to a member function profile_groups() on null