added check to passed in options for definedness of each option

This makes it easier to programmatically generate the options supplied, allowing for a simpler "reset to default" by setting the option passed in to undefined, thus invoking the default.