Tax rules for NRIs and foreigners: Residential status matters