Event Condition using Nickname

Hello,
I'm making a game where the nicknames of characters are used as titles (i.e. 'marquis' or 'Dragon Slayer') and I'm wondering if I can make conditional branches where the branch depends on the nickname, so if you have the nickname 'Marquis' you have access to a certain text but if you don't have it (similarly to a state).
I've looked around but couldn't find anything about it.
Condition "script":

JavaScript:
$gameActors.actor(id of the actor you want to check).nickname() === "Marquis"
Condition "script":

JavaScript:
$gameActors.actor(id of the actor you want to check).nickname() === "Marquis"
Oh great thanks very much. Am not a coder so would have never been able to write that

Original thread: https://forums.rpgmakerweb.com/threads/event-condition-using-nickname.156007/