CheckMatrix_scCustom function

Check Matrix Validity