Incorporate pull request feedback

  - remove unneeded `setType(NoType)`, which was leftover from my
    first attempts to find this bug.
  - fix typo in error message
  - optimize imports