Yes, if you took a deposit from the tenant prior to the start of the tenancy, you must have placed it in one of the three government-approved schemes. If the deposit wasn't protected and the correct information wasn't given to the tenant, the section 21 notice will be invalid. For further information, read Deposit protection schemes.