null entity handling