title: R: How to allow for multiple types in reference class fields
body: <p>In my reference class I've used a field with <code>fields = list(params = &quot;vector)</code>. However, when I'm passing an empty vector <code>c()</code> for the field<code>params</code>,  R throws an error because an empty vector is of type <code>NULL</code>. So is there any easy way to allow for multiple field types, sotheming like <code>&quot;vector | null&quot;</code> ?</p>