Updated gateways to handle null dates