Add err option + better handling of null/undef types