To check if a primitive data type is null you can do the following:

if (value != value){
// then is null
}