Result (String name) { Result result; if (name == null) { result = new Result("Name is null"); return result; } if (name.length() == 0) { result = new Result("Name is empty"); return result; } return null; }