get a type error when adding a new ellement object to the element database