Trying to add a console command
Im trying to make it to where you can use the server console to spawn in a gyrocopter using the gyrocopter plugin

[ConsoleCommand("copterbuild")]
        void cmdConsoleBuildCopter(ConsoleSystem.Arg arg)
        {
            var player = arg.Player() ?? null;
            if (arg.Connection != null) return;
			
			Vector3 position = Vector3.zero;
			
			if (arg.Args.Length == 2)
            {
                var players = FindPlayer(arg.Args[1]);
                if (players.Count > 1)
                {
                    SendReply(arg, "Multiple players found");
                    return;
                }
                else if (players.Count == 0)
                {
                    SendReply(arg, "No players found");
                    return;
                }
                else position = players[0].transform.position;
            }

				AddCopter(player, player.transform.position);
                SendReply(arg, string.Format("Copter built!"));

        }
​

error i am getting: 

(03:40:15) | Failed to call hook 'cmdConsoleBuildCopter' on plugin 'Gyrocopter v1.2.5' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.Gyrocopter.cmdConsoleBuildCopter (ConsoleSystem+Arg arg) [0x00019] in <b1a06927d20047b98a4c96625469817f>:0

at Oxide.Plugins.Gyrocopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x005e1] in <b1a06927d20047b98a4c96625469817f>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

Looks like you are trying to use the player variable without it existing; likely from not supplying a valid argument with the command for which player name to use (not sure why you'd want to do this).