Added exception handling for findItem function.