I am getting `NullPointerException` on Intent. I am coming to the same activity from two different activities. And my code is like:

```
if(getIntent().getStringExtra("action").equals("yes"){   // NULLPOINTER HERE

 //Some code

 }
 else if(getIntent().getStringExtra("action").equals("completed"){

 // Some code

 }

```

When I am sending "completed" in putExtra then it shows error, when I send "yes", it works fine.