LILY-572 Fix NPE