LPS-46682 Fix error: use 0 instead of blank if template is null