[BUGFIX] RTE: Edit element dialogue may raise JavaScript error

When clicking ok, some tabs may have not been rendered. Check for
presence of elements and values.

Releases: master, 6.2
Resolves: #62314
Change-Id: I928ac7ce8bebe2539f49e2153b4f7f8f2f7c889b
Reviewed-on: http://review.typo3.org/33373
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
(cherry picked from commit bb0cfc607a7a3235f783e46606d1c6e5a32f6f2e)
Reviewed-on: http://review.typo3.org/33374