object containment: handle all cases where ID is invalid (missing, nil, non-string)