When I write RestController in Spring, all time I check whether object is null or not. How can I escape this check?

In below example, there is null check and later return notFound or Http status 404. So I don't want to check it all time. 

```
  @GetMapping(path = "/api/member/{member-id}")
  public ResponseEntity<Member> getMemberById(@PathVariable(name="member-id", required=true) final Long memberId) {
    final Member member = memberService.findById(memberId);
    if (member != null) {
      return ResponseEntity.ok(member);
    }
    return ResponseEntity.notFound().build();
  }

```