Added control for presence of id in domain class before try to save
image