Eliminated excessive code by introducing a single Check method