Add CommandCheck() function.