How compare Actor of a certain component to the player Actor

Cast otheractor to ACharacter and first check if this object is valid. then compare the casted acharacter with your playercharacter