updating condition to cover ['oauth'] being NULL