Add a null check in ToNuGetProjectSystem().