Add logging for when entities are null