closes #205

all templates are checked for NPE