Final checker method

Added final checker using substring and indexOf methods