How to handle null exception in my case
<p>I have defined a function:</p>

<pre><code>public MyCar findCar(){
    MyCar car = CarManager.findCarById("U983"); //Nullpointer Exception here if no car be found
    if(car!=null)
        return car;
    else
        return null;

}
</code></pre>

<p>When I invoke the above function in Java, If the above <code>CarManager.findCarById()</code>  did not find any car, it returns <code>null</code>, and I try to check in <code>if condition</code> that if it is <code>null</code> return <code>null</code> other wise return the <code>car</code>.</p>

<p>But the <code>findCar()</code> function always stop and raise <strong>Nullpointer Exception</strong> when findCarById() did not find any car, without go through my <code>if condition</code>. How to get rid of it?</p>

<p><strong>============ findCarById() is a library API I can not modify =================</strong></p>
