change 'if respond_to?' with try