return error from LastInsertId in case @@identity returned NULL