additional check for template type, to handle constructors correctly