JavaScript :
I need to check if every object is null or undefined - if neither, I must proceed with the validation. Else, Javascript throws ugly errors on the screen.
Check for null
if(object!=null) // the object isn't null.
Check for undefined
if(object) // the object is not 'undefined'