use

if(attribute == null){
  throw new ...
}

And otherwise have a look at the ValidationUtil.isNotNull... Saves you a lot of lines.