protected final void checkNamePresent(){
  if (!name.isPresent()) {
    throw new IllegalStateException("Name must be set");
  }
}

protected final void checkNamePresent ( ) { if ( ! name . isPresent ( ) ) { throw new IllegalStateException ( "Name must be set" ) ; } }
checks that the name is present before performing any operation .
