LPS-33828 Adding a Page Template or a Site Template in Control Panel creates an exception

Must consider the add case.
Revert "LPS-33828 Adding a Page Template or a Site Template in Control Panel creates an exception"

This reverts commit 19dc2c706435dbf1dc48b8f3c2d05f93cf97775a.
LPS-33828 Move logic in impl. Does this null and primary key 0 check need to be added to the method below as well? Thx.