目的:StoryBoardのsegueなど、リテラルの入力ミスを防ぎたい

extensionを作成すると良い
extension NSObject {
//クロージャーにしておく
static var className: String { String(describing: self) }
}
使用時は
func changeWindow() {
let vc: UIViewController!
let storyboard = UIStoryboard(name: "Main", bundle: nil)
if Auth.auth().currentUser?.uid != nil {
//これでリテラル入力ミスを防ぐ
vc = storyboard.instantiateViewController(identifier: HomeViewController.className)
}
else {
vc = storyboard.instantiateViewController(identifier: LoginViewController.className)
}