Here is the code:
1- It's okay when offsetBy is 4 or less
    let someString = "hello"
    if let someIndex = someString.index(someString.startIndex, 
                        offsetBy: 4, limitedBy: someString.endIndex){
       someString[someIndex]
    }
    // Prints "o"
2- It's okay when offsetBy is 6 or greater
    if let someIndex = someString.index(someString.startIndex, 
                        offsetBy: 6, limitedBy: someString.endIndex){
       someString[someIndex]
    }
    // Prints "nil"
3- But it gives error when offsetBy is 5
    if let someIndex = someString.index(someString.startIndex, 
                        offsetBy: 5, limitedBy: someString.endIndex){
       someString[someIndex]
    }
    // error
and the error is:
error: Playground execution aborted: error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
 
    