Switch to a project even if not in a project

Also fix the 'Wrong type argument: stringp, nil' error when trying to
switch outside a project