I think this is cleaner:
```java
if (!command.isElementCommand()) {
return getErrorResult("Unable to long click without an element.");
}
```