Prevents crash by better checking if target is a player.