Sorry if the title is rather ambiguous, I was not sure how to word it.

Is it better to phrase a condition such that the outcome you don't want enters the if statement then you exit the function or should I test for the outcome I do want and follow the statement with my code.

Maybe some examples would help:

What I mean by testing for negative result:

```
if(myObject == null) {
    return;
}

//do whatever with myObject

```

What I mean by testing for positive result:

```
if(myObject != null) {
    //do whatever with myObject
}

```

Sorry, if someone can word it better than me please do.