added case to handle null ChaCha structure