## 🐛 Bug Report

Running with java binding and Firefox, the framework occasionally throws NullPointerException on the isDisplayed call.

**Please see https://github.com/mozilla/geckodriver/issues/1825 for more information.** As stated from geckodriver team, the issue is apparently related to the custom JS that is executed with this method. The ticket also contains trace logs. 

## To Reproduce

Hard to provide steps, as it happens "randomly".

## Expected behavior

Should not throw exception..

## Environment

OS: Windows 10
Browser: Firefox
Browser version: 84.0.1
Browser Driver version: geckodriver 0.28.0 (c00d2b6acd3f 2020-11-03 16:29 +0200)
Language Bindings version: java 3.141.59

package org.openqa.selenium.remote;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.Beta;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.Point;
import org.openqa.selenium.Rectangle;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.WrapsDriver;
import org.openqa.selenium.WrapsElement;
import org.openqa.selenium.interactions.Coordinates;
import org.openqa.selenium.interactions.Locatable;
import org.openqa.selenium.io.Zip;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static java.nio.charset.StandardCharsets.UTF_8;
public class RemoteWebElement implements WebElement, WrapsDriver, TakesScreenshot, Locatable {