Fix breakage when context model is null.
Distinguish between pickerbuilder and picker correctly.