Use this code to check if a player is null or valid.
Player target = Bukkit.getServer().getPlayer(args[1]); if (target == null) { //Send message that the player is null. } else { //Continue with your code. }