Improve method  isIn() for errors