use respond_to? instead of catching NameError