Be more defensive about the 'templates' argument and raise a readable exception if it is empty.
Be more defensive about the 'templates' argument and raise a readable exception if it is empty.

openweave/openweave-wdlc,openweave/openweave-wdlc,openweave/openweave-wdlc,openweave/openweave-wdlc