I prefer the first one, because it's the process of elimination, where you return out of the function before the program even has to step through the next round of logic.
I call it my prereq check
- where the function won't execute if it doesn't meet the prereq check
In fact, I do this all the time, for example, the classic one is where i have a function that's expecting an integer and i get a string, i check at the top of the function if it's an integer, NOT if it's not a string or not another object/type, that's just stupid in my book.
It's like a college application to Harvard, a prerequisite:
'I don't want to even want you to come for an interview if you don't have a 3.5GPA or higher!'
:=)