Implemented isRecursive function.