The logic muss be part of the value, you can’t just put it inside the array. This should work:
'bcc' => $page->mail_bcc()->isNotEmpty() ? $page->mail_bcc()->html() : null,
An alternative way to accomplish this would be to add an item conditionally to the array:
$email = [
'from' => $mail_from,
'replyTo' => $mail_reply_to,
'to' => $mail_to,
'subject' => $mail_subject,
'body' => $mail_text
];
if ($page->mail_bcc()->isNotEmpty()) {
$email['bcc'] = $page->mail_bcc()->html(),
}
$kirby->email($email);
You don’t want those quotes around your variables, either.