### Summary

When templating something with the `template` module that results in a blank / empty output, the resulting file contains the string `None`.

I noticed when I templated a config file
```
{# comment #}
{% if expression %}

... something ...

{% endif %}
```
and the resulting file contained the four bytes of `None` in the cases where the expression evaluated to `false`.

### Issue Type

Bug Report

### Component Name

template

### Ansible Version

```console
devel
```


### Configuration

```console
-
```


### OS / Environment

-

### Steps to Reproduce

Playbook:
```yaml (paste below)
- hosts: localhost
  tasks:
    - template:
        src: test-template.j2
        dest: test-template.txt
```
test-template.j2:
```
{# test #}
```
Or simply an empty file. Also adding more Jinja2 commands which do not add something to the output yield the same results.

### Expected Results

test-template.txt is blank

### Actual Results

```console
test-template.txt contains the string `None`.
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
head = list(islice(nodes, 2))
    if not head:
        return None
    if len(head) == 1:
        out = _fail_on_undefined(head[0])
        if isinstance(out, NativeJinjaText):
            return out
        out = to_text(out)
    else:
        out = ''.join([to_text(_fail_on_undefined(v)) for v in chain(head, nodes)])
    if not convert_data:
        return out
    
    do_eval = (
        (
            out.startswith(('{', '[')) and