add size() validation for single json element