Maybe it is worth always checking that an object exists before doing smth with it, e.g.
Code:
{
if (bp != null)
bp.destroy();
}
Code:
{
if (enemyGG[i] != null)
if (result.Pos().distance(ref attackerPos) > enemyGG[i].Pos().distance(ref attackerPos))
{ result = enemyGG[i]; }
}