Fix log message when template type is null