Add check for ResponseEntity<void> with null return value

Issue: SPR-12287