If you really want to distinguish a prototype from a contraption, you could check the typeof "card" rather than "card.parent". There are other visible api differences, like contraption.def and prototype.widgets, but most of the time it's desirable for them to seem the same during prototype editing.