IEDriver crashes in WaitUntilElementFocused() because of null pointer.

Added required null check after document->get_activeElement() call
(see MSDN documentation for more information).

Fixes issue #7577

Signed-off-by: Simon Stewart <simon.m.stewart@gmail.com>