Added sanity check parameters of matrix slice method