Pull request to fix Issue 7577

https://code.google.com/p/selenium/issues/detail?id=7577&thanks=7577&ts=1404811595

Added required null check.

See MSDN documentation for why document->get_activeElement() may return null:
http://msdn.microsoft.com/en-us/library/aa752581(v=vs.85).aspx