     /// - parameter index: A column index.
     /// - returns: An optional *Value*.
     public func value<Value: DatabaseValueConvertible>(atIndex index: Int) -> Value? {
+        guard index >= 0 && index < count else {
+            fatalError("Row index out of range")
+        }
         return impl
             .databaseValue(atIndex: index)
             .value()

        //
        // Without this method, the code above would not compile.
        guard let index = impl.indexForColumn(named: columnName) else {
            fatalError("No such column: \(String(reflecting: columnName))")
        }
        return impl.databaseValue(atIndex: index).value()
    }
    
    /// Returns the value at given column, converted to the requested type.
    ///
    /// Column name is case-insensitive.
    ///
    /// The result is nil if the row does not contain the column, or if the
    /// fetched SQLite value is NULL, or if the SQLite value can not be converted to `Value`.
    ///
    /// Successful conversions include:
    ///

    /// - parameter index: A column index.
    /// - returns: An Int64, Double, String, NSData or nil.
    public func value(atIndex index: Int) -> DatabaseValueConvertible? {
        guard index >= 0 && index < count else {
            fatalError("Row index out of range")
        }
        return impl
            .databaseValue(atIndex: index)
            .value()
