fix: better compiler error for empty templates

Fixes #243