Fix error in findDatapoint if needle empty