Fix auth null check bug