Umayrah bin Ziyad narrates from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that he said: Perform Hajj and make a stipulation, and say: 'Allahumma al-hajja aradtu wa lahu 'amadtu, fa-in tayassara wa illa fa-'umrah' (O Allah, it is Hajj that I intend and for it I have set out; if it is made easy, (then Hajj), otherwise an Umrah).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10119