title: Java 8 avoiding lots of if/else statements
body: <p>I have something that looks like this: </p>
  
  <pre><code> public boolean isValidObject(SomeObject obj){
      if(obj.getField() == null){
        LOG.error("error code 1");
        return false;
      }
      if(obj.getField().getSize() &gt; 500){
        LOG.error("error code 2");
        return false;
      }
      ......
      if(someCondition()){
       log something
       return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>What is the cleanest way of writing this in java 8 with lambdas? </p>