fix: better compiler error for empty templates

Fixes #243

Closes #244