added check for null for when there is no current entry