You can claim the amounts for the months that you had tenants, as well as any part of the year you were actively trying to rent the space. So if you were actively trying to rent out your property for the whole year, you can claim expenses for the whole year, even if you only had tenants for part of it.