Prevent TypeErrors when looking for an element's corpusId
Closes #1004 (closed)
Switching between elements can cause this.element
to become null in the element view components, which can cause a TypeError as this.element.corpus
becomes undefined.