In jclouds we try to avoid returning `null`, and we rely on Guava's `Optional` instead (see [UsingAndAvoidingNullExplained](http://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained)). In this concrete case, however, I think it should be better to change the method to fail if the volume is not attached (callers should take care of checking that before calling this method), by replacing the first conditional by something like:
```java
checkState(ATTACHED == valueOf(target.getState()), "volume is not attached to a vm");
```