Fixed Orm insert/save with type checking