ENH: Invalid write detection