Simij,Mansi | #59, calling setPristine of form only if form is defined