Update fixes for crashes on not opening document and selecting an invalid type.