Is it a good or bad practice to check for NULL?
I have seen code where almost every variable in all application layers is checked for not being NULL. I have also seen code almost without this. 

if(object != null){}

What are the best practices for checking if a variable is NULL? Where does it really make sense, and is getting a nullpointerexception really a bad thing?
Is it a good or bad practice to check for NULL?
===

I have seen code where almost every variable in all application layers is checked for not being NULL. I have also seen code almost without this. 

if(object != null){}

What are the best practices for checking if a variable is NULL? Where does it really make sense, and is getting a nullpointerexception really a bad thing?