use hasattr on the conf object instead of try/catch