Following junegunn's advice, both checks are made together