The getRecipientCategory method for the Device object returns the type of recipient from a script object of an unknown type.
@device::getRecipientCategory()
String: type of recipient
The following example retrieves the recipient category from a script object of an unknown type:
@targetRecipient = @event::getRecipient($content.recipient_target)
$type = @targetRecipient::getRecipientCategory()
@script::log($type)
DEVICE