OK so I don't think there's a much better way to do this, but I did tweak the original code a bit to now just be the following:
public function role(string $workspaceID): Role
{
return $this->roles->filter(function($role) use ($workspaceID) {
return $role->workspace_id == $workspaceID || $role->workspace_id == null;
})->first();
}
Basically, roles() has my relationship on it and role() allows me to grab a single role and I just filter the content. There may be something better out there, I really don't know, but for now this works.