I prefer the second option:
if(data == null || data.isEmpty()) { return; }
As you can add your logic after that without having to encapsulate all the code in the if statement, which makes your code less readable, the reader will see it as a separate section of the code.
And this will allow you in the future to centrally split and, if necessary, expand all the conditions that will force you to leave this routine instead of having a lot of nested if. Consider speed code written: read about 1:10
source share