Script to check if certain MAC is connected in wireless reg

I want to run a script on an access point that will check the wireless registation tables to see if a certain MAC address is present and to take action if it is not.

This is what I came up with:
:if ([/int wir reg pri from [find mac-address=00:0C:42:0C:C1:47]] = 1 ) do [:put hello]

But of course I can’t just use =1. Is there an if exsists or anything like that?

:len can be used

sometimes you can also check to see if its nil / nothing