Add a redundant safety check to insert