Fix potential NPE in the LiquidGenerator