Template for testing to see if a json key exists in MQTT topic

And I think I stumbled upon my answer:

“3. You must surround single-line templates with double quotes ( " ) or single quotes ( ' ).”

Since the quotes are required for single line templates if the same line is put in a multi-line template and surrounded by quotes it apparently acts completely differently.