Put some safety checks in core_options.c functions