As primitives(long) can't be null,It can be converted to wrapper class of that primitive type(ie.Long) and null check can be performed.
If you want to check whether long variable is null,you can convert that into Long and check,
long longValue=null;
if(Long.valueOf(longValue)==null)