Simplifying null checks with Objects.requireNonNull()