I don't get why this does not work

Hello

I got vey confused with zola variables and tera. I must be missing something obvious. I just tried

{{ page.content  | replace(from=page.summary, to="") }}

and am told it fails because page.summary is not a string

Error: Reason: Filter `replace` received an incorrect type for arg `from`: got `null` but expected a String

if I try

{% set x= "delete me" %}
{{ page.content  | replace(from=x, to="") }}

it works.
I don’t get why tera thinks page.summary is null, when I have no problem displaying it with

{{ page.summary }}

so if I could convert page.summary into a string it would solve showing content with summary, I saw a post on why it is not possible to do that, but

all the best, j