public static IToken CheckValid(this IToken token, string parameterName, Func<IToken, bool> predicate, string message) { return token.CheckNotNull(parameterName).Check( x => !x.IsNull, "Token references null row", parameterName ).Check(predicate, message, parameterName); }