This is the way to do it:

tasks:
  - debug:
      msg: The type of myvar is 

That’s useful when debugging strange problems in Ansible.