null check in presence code