Below is a fairly standard piece of Java code which has been translated to Scala

```
 val result: ResultSet = statement.executeQuery(query)

  while (result.next) {
    if (result.getDouble("FIELD") != null) {

    }
 }

```

Why do I get

> 
> warning: comparing values of types Double and Null using `!=' will
>  always yield true?
> 
> 
>