Fix issue with command crashing the server

(First edit), just a check to see if no target is selected.