Add comparison of apple index to undefined