added option to allow nil on load