You are able to deduct rental expenses if there was no rental income, but the property must have been "available for rent". If you did not attempt to rent the property while you were waiting to sell it, you should not deduct the expenses. From the IRS:
Vacant while listed for sale. If you sell property you held for rental purposes, you can deduct the ordinary and necessary expenses for managing, conserving, or maintaining the property until it is sold. If the property isn’t held out and available for rent while listed for sale, the expenses aren’t deductible rental expenses.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"