Added support for empty lists

Because I am using recursion as a limit to find it, I use Runtime error to raise an excpetion if it is not in the list. However, this also indirectly checks the size of the list it can handle. It can process 5000 iterations, before python will raise the runtime error, which limits it to 5000 iterations, or a list of length 2^5000.