Do not try to set previous tenant if it is None.

If previous tenant is None, there is error when trying to set it back.

This happens for example when it happens that schema is reseted to public when it is already public.