WIP: validate entities before DB insertion