Thats a lot of paramters being passed, could be one of those are not getting needed info. best to unit test each one before running instantiate on them.
for instance:
// break this down
spawnPoint = GameObject.Find(“Spawnpoi ntA”);
spawnPosition = spawnPoint.transform.position;
Debug.Log(spawnPosition);
once your params are good then move onto the instantiate()
I would also try removing the var