add variable condition in optional binding