fix casting if value from OrienDB is NULL