Assert f and g are not nil