improved item ptr check