what if `provider` is null?