Fix integer check on searchByIndex