+ added type enforcing to Database and Model classes